Fix exception when pane items with no view are removed from the pane

This commit is contained in:
Nathan Sobo
2013-02-26 14:23:36 -07:00
committed by probablycorey
parent 2e2ff3a1d0
commit 7aba839dac

View File

@@ -124,7 +124,7 @@ class Pane extends View
viewClass = item.getViewClass()
otherItemsForView = @items.filter (i) -> i.getViewClass?() is viewClass
unless otherItemsForView.length
@viewsByClassName[viewClass.name].remove()
@viewsByClassName[viewClass.name]?.remove()
delete @viewsByClassName[viewClass.name]
viewForItem: (item) ->