mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Only move legit items to the top of the stack
Fixes #11002 cc @natalieogle
This commit is contained in:
@@ -307,6 +307,7 @@ class Pane extends Model
|
||||
|
||||
# Add item (or move item) to the end of the itemStack
|
||||
addItemToStack: (newItem) ->
|
||||
return unless newItem?
|
||||
index = @itemStack.indexOf(newItem)
|
||||
@itemStack.splice(index, 1) unless index is -1
|
||||
@itemStack.push(newItem)
|
||||
|
||||
Reference in New Issue
Block a user