[gnome-shell/gnome-3-24] panel: Fix a JS warning
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-24] panel: Fix a JS warning
- Date: Thu, 13 Jul 2017 15:36:11 +0000 (UTC)
commit 363d35a3eb626964933bb4abdaa2f8762df97aea
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jun 13 04:46:37 2017 +0200
panel: Fix a JS warning
We need to track the open-status of indicator menus, but don't want
to hook up signals more than once, so we check for the handler ID
we store on the object. As the property is only defined once we did
set up the signal connection, this check now logs a warning. We
can avoid it by checking for the existence of the property rather
than a particular value.
https://bugzilla.gnome.org/show_bug.cgi?id=781471
js/ui/panel.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index fe3fc39..55b9dc9 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -1104,7 +1104,7 @@ const Panel = new Lang.Class({
},
_onMenuSet: function(indicator) {
- if (!indicator.menu || indicator.menu._openChangedId > 0)
+ if (!indicator.menu || indicator.menu.hasOwnProperty('_openChangedId'))
return;
indicator.menu._openChangedId = indicator.menu.connect('open-state-changed',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]