Fixes auto updater regression, closes atom/atom#1949.
This commit is contained in:
parent
f280590adf
commit
a69c312389
2 changed files with 7 additions and 4 deletions
|
@ -12,13 +12,13 @@ autoUpdater.quitAndInstall = ->
|
|||
BrowserWindow = require 'browser-window'
|
||||
windows = BrowserWindow.getAllWindows()
|
||||
if windows.length is 0
|
||||
AutoUpdater::quitAndInstall.call this
|
||||
@_quitAndInstall()
|
||||
return
|
||||
|
||||
# Do the restart after all windows have been closed.
|
||||
app = require 'app'
|
||||
app.removeAllListeners 'window-all-closed'
|
||||
app.once 'window-all-closed', AutoUpdater::quitAndInstall.bind(this)
|
||||
app.once 'window-all-closed', @_quitAndInstall.bind(this)
|
||||
win.close() for win in windows
|
||||
|
||||
module.exports = autoUpdater
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue