mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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:
parent
c9df2f9370
commit
40e22eb524
18 changed files with 36 additions and 37 deletions
|
|
@ -770,7 +770,7 @@ var PadOsd = GObject.registerClass({
|
|||
|
||||
_getActionText(type, number) {
|
||||
let str = global.display.get_pad_action_label(this.padDevice, type, number);
|
||||
return str ? str : _("None");
|
||||
return str ?? _('None');
|
||||
}
|
||||
|
||||
_updateActionLabels() {
|
||||
|
|
@ -887,7 +887,7 @@ var PadOsd = GObject.registerClass({
|
|||
if (this._followUpActionEdition(str))
|
||||
return;
|
||||
|
||||
this._padDiagram.stopEdition(false, str ? str : _("None"));
|
||||
this._padDiagram.stopEdition(false, str ?? _('None'));
|
||||
this._editedAction = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue