appFavorites: Fix nonsense condition
The "in" operator has a lower precedence than negation, so we are actually testing whether the favorites map contains "false". 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
91319e3963
commit
c353914dd0
@ -153,7 +153,7 @@ class AppFavorites {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_removeFavorite(appId) {
|
_removeFavorite(appId) {
|
||||||
if (!appId in this._favorites)
|
if (!(appId in this._favorites))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let ids = this._getIds().filter(id => id != appId);
|
let ids = this._getIds().filter(id => id != appId);
|
||||||
|
Loading…
Reference in New Issue
Block a user