Blob Blame History Raw
From 6e46f2345e7dca889690f50e56a0acdf61b72028 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Mon, 24 Feb 2020 18:10:32 +0100
Subject: [PATCH 4/6] utils: Use more ES6-compliant code to override calls

---
 utils.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/utils.js b/utils.js
index e028134..a7c657a 100644
--- a/utils.js
+++ b/utils.js
@@ -22,9 +22,8 @@ const BasicHandler = class DashToDock_BasicHandler {
 
     add(/* unlimited 3-long array arguments */) {
         // Convert arguments object to array, concatenate with generic
-        let args = Array.concat('generic', Array.slice(arguments));
         // Call addWithLabel with ags as if they were passed arguments
-        this.addWithLabel.apply(this, args);
+        this.addWithLabel('generic', ...arguments);
     }
 
     destroy() {
-- 
2.24.1