code from this:
```javascript
-app.on('ready', function() {
- var tray = new Tray('/path/to/icon.png');
+app.on('ready', () => {
+ const tray = new Tray('/path/to/icon.png');
})
```
to this:
```javascript
-var tray = null;
-app.on('ready', function() {
+let tray = null;
+app.on('ready', () => {
tray = new Tray('/path/to/icon.png');
})
```
```javascript
// In the main process.
-var mainWindow = new BrowserWindow({
+let mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: false
}