From 363d35a3eb626964933bb4abdaa2f8762df97aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 13 Jun 2017 04:46:37 +0200 Subject: [PATCH] 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index fe3fc392f..55b9dc9f8 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',