mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Make sure window.shutdown is only called once
This commit is contained in:
@@ -8,6 +8,7 @@ require 'underscore-extensions'
|
||||
require 'space-pen-extensions'
|
||||
|
||||
deserializers = {}
|
||||
wasShutdown = false
|
||||
|
||||
windowAdditions =
|
||||
rootViewParentSelector: 'body'
|
||||
@@ -68,6 +69,8 @@ windowAdditions =
|
||||
$(rootViewParentSelector).append(rootView)
|
||||
|
||||
shutdown: ->
|
||||
return if wasShutdown
|
||||
wasShutdown = true
|
||||
atom.setWindowState('pathToOpen', project.getPath())
|
||||
atom.setRootViewStateForPath project.getPath(),
|
||||
project: project.serialize()
|
||||
|
||||
Reference in New Issue
Block a user