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:
Florian Müllner 2019-12-19 20:50:37 +01:00 committed by Georges Basile Stavracas Neto
parent 654a7af929
commit 3a863ee341
2 changed files with 2 additions and 2 deletions

View File

@ -2561,7 +2561,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
'org.gtk.Actions', 'Activate',
GLib.Variant.new('(sava{sv})',
['details', [args], null]),
null, 0, -1, null, null);
null, 0, -1, null);
Main.overview.hide();
});
});

View File

@ -100,7 +100,7 @@ class AppMenu extends PopupMenu.PopupMenu {
'org.gtk.Actions', 'Activate',
GLib.Variant.new('(sava{sv})',
['details', [args], null]),
null, 0, -1, null, null);
null, 0, -1, null);
});
});