Fix lint warnings

This commit is contained in:
Cheng Zhao 2016-04-13 23:10:31 +09:00
parent 43c44da50b
commit 8f0e594007
2 changed files with 5 additions and 4 deletions

View file

@ -82,7 +82,7 @@ BrowserWindow.prototype._init = function () {
let isVisible = this.isVisible() && !this.isMinimized()
let visibilityChanged = () => {
let newState = this.isVisible() && !this.isMinimized()
if (isVisible != newState) {
if (isVisible !== newState) {
isVisible = newState
this.webContents.send('ELECTRON_RENDERER_WINDOW_VISIBILITY_CHANGE', isVisible ? 'visible' : 'hidden')
}
@ -94,8 +94,9 @@ BrowserWindow.prototype._init = function () {
this.on('maximize', visibilityChanged)
// Make renderer process have correct initial state.
if (!isVisible)
if (!isVisible) {
this.webContents.mergeWebPreferences({visibilityState: 'hidden'})
}
// Notify the creation of the window.
app.emit('browser-window-created', {}, this)