Only serialize edit sessions with a path

This commit is contained in:
Kevin Sawicki
2013-02-13 13:11:55 -08:00
parent 06f0988028
commit 38fa030f7e
2 changed files with 3 additions and 1 deletions

View File

@@ -164,7 +164,8 @@ class FuzzyFinderView extends SelectList
getOpenedPaths: ->
paths = {}
for editSession in rootView.project.getEditSessions()
paths[editSession.getPath()] = editSession.lastOpened
path = editSession.getPath()
paths[path] = editSession.lastOpened if path?
paths
detach: ->

View File

@@ -151,6 +151,7 @@ describe 'FuzzyFinder', ->
rootView.trigger 'fuzzy-finder:toggle-buffer-finder'
rootView.open 'sample.js'
rootView.trigger 'fuzzy-finder:toggle-buffer-finder'
rootView.open()
states = rootView.serialize().packageStates
states = _.map states['fuzzy-finder'], (path, time) -> [ path, time ]