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:
Florian Müllner 2019-01-29 22:43:41 +01:00 committed by Florian Müllner
parent 91319e3963
commit c353914dd0

View File

@ -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);