From e564630423981777902f308dc093dd512f9be90c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20R=C3=BCedlinger?= Date: Sat, 7 Oct 2017 07:22:39 +0200 Subject: [PATCH] utils.js: fix mozjs52 warning This commit prevent the warning message (#586): "reference to undefined property Symbol.toPrimitive". It seems that gnome-shell 3.26 (or mozjs52) doesn't like the use of direct method calls on map elements, although we don't know why. --- utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.js b/utils.js index 8302ee4bb..651464988 100644 --- a/utils.js +++ b/utils.js @@ -31,7 +31,8 @@ const BasicHandler = new Lang.Class({ // Skip first element of the arguments for (let i = 1; i < arguments.length; i++) { - this._storage[label].push( this._create(arguments[i])); + let item = this._storage[label]; + item.push(this._create(arguments[i])); } }, @@ -251,4 +252,4 @@ function drawRoundedLine(cr, x, y, width, height, isRoundLeft, isRoundRight, str if (stroke != null) cr.setSource(stroke); cr.stroke(); -} \ No newline at end of file +}