cleanup: Use optional chaining and ?? operator
Those operators have been supported since gjs switched to mozjs78 last cycle. While not ground-breaking, using it makes for a nice cleanup here and there. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1517>
This commit is contained in:

committed by
Marge Bot

parent
c9df2f9370
commit
40e22eb524
@ -160,11 +160,12 @@ var GnomeShell = class {
|
||||
if (deviceNode)
|
||||
params['device-node'] = GLib.Variant.new('s', deviceNode);
|
||||
|
||||
connection.emit_signal(destination,
|
||||
this._dbusImpl.get_object_path(),
|
||||
info ? info.name : null,
|
||||
'AcceleratorActivated',
|
||||
GLib.Variant.new('(ua{sv})', [action, params]));
|
||||
connection.emit_signal(
|
||||
destination,
|
||||
this._dbusImpl.get_object_path(),
|
||||
info?.name ?? null,
|
||||
'AcceleratorActivated',
|
||||
GLib.Variant.new('(ua{sv})', [action, params]));
|
||||
}
|
||||
|
||||
_grabAcceleratorForSender(accelerator, modeFlags, grabFlags, sender) {
|
||||
|
Reference in New Issue
Block a user