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
@ -676,8 +676,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
let userAvatar = new UserWidget.Avatar(session.user, { iconSize: _ITEM_ICON_SIZE });
|
||||
userAvatar.update();
|
||||
|
||||
userName = session.user.get_real_name()
|
||||
? session.user.get_real_name() : session.username;
|
||||
userName = session.user.get_real_name() ?? session.username;
|
||||
|
||||
let userLabelText;
|
||||
if (session.remote)
|
||||
|
Reference in New Issue
Block a user