iconGrid: Fix nonsense condition
Just like the "in" operator in the previous patch, "instanceof" has a lower precedence than negation, resulting in the nonsense condition of "true instanceof BaseIcon". Add parentheses to get the intended behavior. Spotted by eslint. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
This commit is contained in:
parent
c353914dd0
commit
a7943ff934
@ -670,7 +670,7 @@ var IconGrid = GObject.registerClass({
|
||||
}
|
||||
|
||||
addItem(item, index) {
|
||||
if (!item.icon instanceof BaseIcon)
|
||||
if (!(item.icon instanceof BaseIcon))
|
||||
throw new Error('Only items with a BaseIcon icon property can be added to IconGrid');
|
||||
|
||||
this._items.push(item);
|
||||
|
Loading…
Reference in New Issue
Block a user