Omit destroyed pane items

This is an interim solution which enables atom/image-view#4 to correctly
deserialize when the path has been deleted both on atom master and in
atom/atom#1326.
This commit is contained in:
Nathan Sobo
2013-12-17 21:35:44 -07:00
parent e853bbfcb6
commit 0dc031140c

View File

@@ -37,6 +37,7 @@ class Pane extends View
@items = _.compact @state.get('items').map (item) ->
item = atom.deserializers.deserialize(item)
item?.created?()
return if item?.state?.isDestroyed?()
item
else
@items = args