Skip to content

Commit 3271492

Browse files
committed
📝 Update FAQ to ES6 [ci skip]
1 parent afe0296 commit 3271492

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/faq/electron-faq.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ If you want a quick fix, you can make the variables global by changing your
6060
code from this:
6161

6262
```javascript
63-
app.on('ready', function() {
64-
var tray = new Tray('/path/to/icon.png');
63+
app.on('ready', () => {
64+
const tray = new Tray('/path/to/icon.png');
6565
})
6666
```
6767

6868
to this:
6969

7070
```javascript
71-
var tray = null;
72-
app.on('ready', function() {
71+
let tray = null;
72+
app.on('ready', () => {
7373
tray = new Tray('/path/to/icon.png');
7474
})
7575
```
@@ -84,7 +84,7 @@ To solve this, you can turn off node integration in Electron:
8484

8585
```javascript
8686
// In the main process.
87-
var mainWindow = new BrowserWindow({
87+
let mainWindow = new BrowserWindow({
8888
webPreferences: {
8989
nodeIntegration: false
9090
}

0 commit comments

Comments
 (0)