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
This commit is contained in:
parent
755698a756
commit
28d098394a
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user