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())
|
this._setTouchBar(touchBar.toJSON())
|
||||||
}
|
}
|
||||||
touchBar._owner = this
|
touchBar._owner = this
|
||||||
touchBar.items.forEach((item) => { item._owner = this; })
|
touchBar.items.forEach((item) => {
|
||||||
|
item._owner = this
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserWindow.prototype._updateTouchBarItem = function (itemID) {
|
BrowserWindow.prototype._updateTouchBarItem = function (itemID) {
|
||||||
this._refreshTouchBarItem(itemID);
|
this._refreshTouchBarItem(itemID)
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = BrowserWindow
|
module.exports = BrowserWindow
|
||||||
|
|
|
@ -46,12 +46,12 @@ class TouchBarItem {
|
||||||
|
|
||||||
updateConfig (newConfig) {
|
updateConfig (newConfig) {
|
||||||
if (!this._owner) {
|
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);
|
const dupConfig = Object.assign({}, newConfig)
|
||||||
delete dupConfig.id;
|
delete dupConfig.id
|
||||||
Object.assign(this.config, dupConfig);
|
Object.assign(this.config, dupConfig)
|
||||||
this._owner._updateTouchBarItem(this.toJSON());
|
this._owner._updateTouchBarItem(this.toJSON())
|
||||||
}
|
}
|
||||||
|
|
||||||
toJSON () {
|
toJSON () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue