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
@ -96,11 +96,13 @@ var Button = GObject.registerClass({
|
||||
Signals: { 'menu-set': {} },
|
||||
}, class PanelMenuButton extends ButtonBox {
|
||||
_init(menuAlignment, nameText, dontCreateMenu) {
|
||||
super._init({ reactive: true,
|
||||
can_focus: true,
|
||||
track_hover: true,
|
||||
accessible_name: nameText ? nameText : "",
|
||||
accessible_role: Atk.Role.MENU });
|
||||
super._init({
|
||||
reactive: true,
|
||||
can_focus: true,
|
||||
track_hover: true,
|
||||
accessible_name: nameText ?? '',
|
||||
accessible_role: Atk.Role.MENU,
|
||||
});
|
||||
|
||||
if (dontCreateMenu)
|
||||
this.menu = new PopupMenu.PopupDummyMenu(this);
|
||||
|
Reference in New Issue
Block a user