mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue