js: Account for promisified call() method
A promisified method expects the callback parameter to be either a function (in which case the original method is called normally) or omitted altogether (in which case a Promise is returned). The call to open application details in Software does neither and passes null instead, which will result in a warning (because no function argument means a promise will be used, but not omitting the parameter means we end up with too many arguments). https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2551
This commit is contained in:
parent
a9df4e7516
commit
1666fa195d
@ -2561,7 +2561,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
|
|||||||
'org.gtk.Actions', 'Activate',
|
'org.gtk.Actions', 'Activate',
|
||||||
new GLib.Variant.new(
|
new GLib.Variant.new(
|
||||||
'(sava{sv})', ['details', [args], null]),
|
'(sava{sv})', ['details', [args], null]),
|
||||||
null, 0, -1, null, null);
|
null, 0, -1, null);
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ class AppMenu extends PopupMenu.PopupMenu {
|
|||||||
'/org/gnome/Software',
|
'/org/gnome/Software',
|
||||||
'org.gtk.Actions', 'Activate',
|
'org.gtk.Actions', 'Activate',
|
||||||
new GLib.Variant('(sava{sv})', ['details', [args], null]),
|
new GLib.Variant('(sava{sv})', ['details', [args], null]),
|
||||||
null, 0, -1, null, null);
|
null, 0, -1, null);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
|
Loading…
Reference in New Issue
Block a user