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:
Florian Müllner
2020-08-12 20:59:01 +02:00
committed by Marge Bot
parent c9df2f9370
commit 40e22eb524
18 changed files with 36 additions and 37 deletions

View File

@ -891,7 +891,7 @@ var WindowManager = class {
// FIXME: Fix num buttons
for (let i = 0; i < 50; i++) {
let str = display.get_pad_action_label(pad, Meta.PadActionType.BUTTON, i);
labels.push(str ? str : '');
labels.push(str ?? '');
}
if (this._gsdWacomProxy) {