mirror of
https://github.com/atom/atom.git
synced 2026-02-15 00:55:14 -05:00
Create default project/root-view if deserialization fails
If either fails to deserialize from the persisted state then fall back to the default constructors. This ensures Atom will still start even if the serialization format changes and the previous stored state can no longer be successfully deserialized.
This commit is contained in:
@@ -64,9 +64,8 @@ windowAdditions =
|
||||
if windowState?.project?
|
||||
window.project = deserialize(windowState.project)
|
||||
window.rootView = deserialize(windowState.rootView)
|
||||
else
|
||||
window.project = new Project(atom.getPathToOpen())
|
||||
window.rootView = new RootView
|
||||
window.project ?= new Project(atom.getPathToOpen())
|
||||
window.rootView ?= new RootView
|
||||
$(rootViewParentSelector).append(rootView)
|
||||
|
||||
stopApplication: ->
|
||||
|
||||
Reference in New Issue
Block a user