panel: Relax check for existing signal handler
Object.prototype.hasOwnProperty() is more precise than checking for falsiness, for instance the following is true: { foo: undefined }.hasOwnProperty('foo'); However when checking for a handler ID, a more relaxed check is more appropriate, as particularly 0 is not a valid handler ID. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626
This commit is contained in:
parent
1b31fd5afe
commit
16ca7a21a7
@ -1167,7 +1167,7 @@ class Panel extends St.Widget {
|
||||
}
|
||||
|
||||
_onMenuSet(indicator) {
|
||||
if (!indicator.menu || indicator.menu.hasOwnProperty('_openChangedId'))
|
||||
if (!indicator.menu || indicator.menu._openChangedId)
|
||||
return;
|
||||
|
||||
indicator.menu._openChangedId = indicator.menu.connect('open-state-changed',
|
||||
|
Loading…
Reference in New Issue
Block a user