diff --git a/src/app/root-view.coffee b/src/app/root-view.coffee index 5adee2902..3b14e4378 100644 --- a/src/app/root-view.coffee +++ b/src/app/root-view.coffee @@ -23,9 +23,13 @@ class RootView extends View @div id: 'vertical', outlet: 'vertical', => @div id: 'panes', outlet: 'panes' - @deserialize: ({ projectState, panesViewState, packageStates }) -> - project = Project.deserialize(projectState) if projectState - rootView = new RootView(project, packageStates: packageStates, suppressOpen: true) + @deserialize: ({ projectState, panesViewState, packageStates, projectPath }) -> + if projectState + projectOrPathToOpen = Project.deserialize(projectState) + else + projectOrPathToOpen = projectPath # This will migrate people over to the new project serialization scheme. It should be removed eventually. + + rootView = new RootView(projectOrPathToOpen , packageStates: packageStates, suppressOpen: true) rootView.setRootPane(rootView.deserializeView(panesViewState)) if panesViewState rootView @@ -38,7 +42,7 @@ class RootView extends View @packageStates ?= {} @packageModules = {} - if not projectOrPathToOpen or _.isString(projectOrPathToOpen) + if not projectOrPathToOpen or _.isString(projectOrPathToOpen) pathToOpen = projectOrPathToOpen @project = new Project(projectOrPathToOpen) else