mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Clone menu items before merging them in in menu-helpers
This commit is contained in:
@@ -4,6 +4,7 @@ ItemSpecificities = new WeakMap
|
||||
|
||||
merge = (menu, item, itemSpecificity=Infinity) ->
|
||||
ItemSpecificities.set(item, itemSpecificity) if itemSpecificity
|
||||
item = cloneMenuItem(item)
|
||||
matchingItemIndex = findMatchingItemIndex(menu, item)
|
||||
matchingItem = menu[matchingItemIndex] unless matchingItemIndex is - 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user