Skip to content

Commit

Permalink
utils.js: fix mozjs52 warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lexruee authored and micheleg committed Oct 9, 2017
1 parent 68a6ede commit e564630
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
}
},

Expand Down Expand Up @@ -251,4 +252,4 @@ function drawRoundedLine(cr, x, y, width, height, isRoundLeft, isRoundRight, str
if (stroke != null)
cr.setSource(stroke);
cr.stroke();
}
}

0 comments on commit e564630

Please sign in to comment.