[gnome-shell/wip/fmuellner/minor-bug-fixes: 4/10] appFavorites: Fix nonsense condition
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/minor-bug-fixes: 4/10] appFavorites: Fix nonsense condition
- Date: Wed, 30 Jan 2019 16:14:07 +0000 (UTC)
commit c353914dd081c243d8d9a2b0670a35ed19c94cce
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jan 29 22:43:41 2019 +0100
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
js/ui/appFavorites.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/appFavorites.js b/js/ui/appFavorites.js
index 0bdf41b22..cc3e3c32a 100644
--- a/js/ui/appFavorites.js
+++ b/js/ui/appFavorites.js
@@ -153,7 +153,7 @@ class AppFavorites {
}
_removeFavorite(appId) {
- if (!appId in this._favorites)
+ if (!(appId in this._favorites))
return false;
let ids = this._getIds().filter(id => id != appId);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]