Remove linter warnings
This commit is contained in:
parent
9272582bd6
commit
9bdca3bbfb
2 changed files with 10 additions and 8 deletions
|
@ -213,11 +213,13 @@ BrowserWindow.prototype.setTouchBar = function (touchBar) {
|
|||
this._setTouchBar(touchBar.toJSON())
|
||||
}
|
||||
touchBar._owner = this
|
||||
touchBar.items.forEach((item) => { item._owner = this; })
|
||||
touchBar.items.forEach((item) => {
|
||||
item._owner = this
|
||||
})
|
||||
}
|
||||
|
||||
BrowserWindow.prototype._updateTouchBarItem = function (itemID) {
|
||||
this._refreshTouchBarItem(itemID);
|
||||
this._refreshTouchBarItem(itemID)
|
||||
}
|
||||
|
||||
module.exports = BrowserWindow
|
||||
|
|
|
@ -44,14 +44,14 @@ class TouchBarItem {
|
|||
}
|
||||
}
|
||||
|
||||
updateConfig(newConfig) {
|
||||
updateConfig (newConfig) {
|
||||
if (!this._owner) {
|
||||
throw new Error('Cannot call methods on TouchBarItems without assigning to a BrowserWindow');
|
||||
throw new Error('Cannot call methods on TouchBarItems without assigning to a BrowserWindow')
|
||||
}
|
||||
const dupConfig = Object.assign({}, newConfig);
|
||||
delete dupConfig.id;
|
||||
Object.assign(this.config, dupConfig);
|
||||
this._owner._updateTouchBarItem(this.toJSON());
|
||||
const dupConfig = Object.assign({}, newConfig)
|
||||
delete dupConfig.id
|
||||
Object.assign(this.config, dupConfig)
|
||||
this._owner._updateTouchBarItem(this.toJSON())
|
||||
}
|
||||
|
||||
toJSON () {
|
||||
|
|
Loading…
Reference in a new issue