mirror of
https://github.com/atom/atom.git
synced 2026-01-29 00:38:11 -05:00
remove duplicate context menu entries
This commit is contained in:
@@ -60,7 +60,8 @@ class ContextMenuManager
|
||||
# editor is in dev mode.
|
||||
addBySelector: (selector, definition, {devMode}={}) ->
|
||||
definitions = if devMode then @devModeDefinitions else @definitions
|
||||
(definitions[selector] ?= []).push(definition)
|
||||
unless _.findWhere(definitions[selector], command: definition.command)
|
||||
(definitions[selector] ?= []).push(definition)
|
||||
|
||||
# Returns definitions which match the element and devMode.
|
||||
definitionsForElement: (element, {devMode}={}) ->
|
||||
|
||||
Reference in New Issue
Block a user