mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
🚱 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:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user