refactor: use optional chaining / nullish coalescing operator (#35217)
This commit is contained in:
parent
76431ac1fa
commit
34b985c556
5 changed files with 7 additions and 8 deletions
|
@ -395,7 +395,7 @@ class TouchBar extends EventEmitter implements Electron.TouchBar {
|
|||
this.on('change', changeListener);
|
||||
|
||||
const escapeItemListener = (item: Electron.TouchBarItemType | null) => {
|
||||
window._setEscapeTouchBarItem(item != null ? item : {});
|
||||
window._setEscapeTouchBarItem(item ?? {});
|
||||
};
|
||||
this.on('escape-item-change', escapeItemListener);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue