docs: fix undefined isMac in menu example (#19071)

* docs: fix undefined isMac in menu example

* docs: remove ; in example
This commit is contained in:
Chase Colman 2019-07-02 11:09:10 -04:00 committed by Charles Kerr
parent dee331519c
commit 9a4e551c8b

View file

@ -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' },