🚱 Properly remove items from pane's state document

Fixes #1299.

This updates Pane::removeItemAtIndex to call Array::splice with the
index to be removed instead of Array::remove, which was changed to take
the *object* to be remove rather than an index. Oops.
This commit is contained in:
Nathan Sobo
2013-12-11 21:37:12 -08:00
parent 6a8697a357
commit b9b8c61c11

View File

@@ -274,7 +274,7 @@ class Pane extends View
@activeItem.off? 'title-changed', @activeItemTitleChanged if item is @activeItem
@showNextItem() if item is @activeItem and @items.length > 1
_.remove(@items, item)
@state.get('items').remove(index) if options.updateState ? true
@state.get('items').splice(index, 1) if options.updateState ? true
@cleanupItemView(item)
@trigger 'pane:item-removed', [item, index]