From 28d098394acff4d9d9ca0651edd64fd626a636bc 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 52c89d79c..d9df2618a 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -1160,7 +1160,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',