Fix JS linting
This commit is contained in:
parent
257b32b84b
commit
4f0caffc3b
3 changed files with 25 additions and 28 deletions
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const {ipcMain,TouchBar} = require('electron')
|
||||
const {ipcMain, TouchBar} = require('electron')
|
||||
const {EventEmitter} = require('events')
|
||||
const {BrowserWindow} = process.atomBinding('window')
|
||||
const v8Util = process.atomBinding('v8_util')
|
||||
|
@ -133,8 +133,8 @@ BrowserWindow.prototype._init = function () {
|
|||
})
|
||||
|
||||
// Proxy TouchBar events
|
||||
this.on('-touch-bar-interaction', (event, item_type, id, ...args) => {
|
||||
TouchBar._event(item_type, id, ...args)
|
||||
this.on('-touch-bar-interaction', (event, itemType, id, ...args) => {
|
||||
TouchBar._event(itemType, id, ...args)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -206,9 +206,9 @@ Object.assign(BrowserWindow.prototype, {
|
|||
// TouchBar API
|
||||
BrowserWindow.prototype.setTouchBar = function (touchBar) {
|
||||
if (touchBar === null || typeof touchBar === 'undefined') {
|
||||
this._destroyTouchBar();
|
||||
this._destroyTouchBar()
|
||||
} else if (Array.isArray(touchBar)) {
|
||||
this._setTouchBar((new TouchBar(touchBar)).toJSON());
|
||||
this._setTouchBar((new TouchBar(touchBar)).toJSON())
|
||||
} else {
|
||||
this._setTouchBar(touchBar.toJSON())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue