mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue