docs: use optional chaining for app.dock
(#46119)
docs: use optional chaining for app.dock
This commit is contained in:
parent
d424c3aee7
commit
bf1d377e08
3 changed files with 3 additions and 7 deletions
|
@ -50,9 +50,7 @@ const dockMenu = Menu.buildFromTemplate([
|
|||
])
|
||||
|
||||
app.whenReady().then(() => {
|
||||
if (process.platform === 'darwin') {
|
||||
app.dock.setMenu(dockMenu)
|
||||
}
|
||||
app.dock?.setMenu(dockMenu)
|
||||
}).then(createWindow)
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue