docs: fix undefined isMac in menu example (#19071)
* docs: fix undefined isMac in menu example * docs: remove ; in example
This commit is contained in:
parent
dee331519c
commit
9a4e551c8b
1 changed files with 3 additions and 1 deletions
|
@ -152,9 +152,11 @@ simple template API:
|
|||
```javascript
|
||||
const { app, Menu } = require('electron')
|
||||
|
||||
const isMac = process.platform === 'darwin'
|
||||
|
||||
const template = [
|
||||
// { role: 'appMenu' }
|
||||
...(process.platform === 'darwin' ? [{
|
||||
...(isMac ? [{
|
||||
label: app.name,
|
||||
submenu: [
|
||||
{ role: 'about' },
|
||||
|
|
Loading…
Reference in a new issue