mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
minor changes
This commit is contained in:
parent
5ca6d01911
commit
6295c2ddc4
@ -17,6 +17,17 @@ describe "ContextMenuManager", ->
|
||||
expect(contextMenu.definitions['.selector'][0].label).toEqual 'label'
|
||||
expect(contextMenu.definitions['.selector'][0].command).toEqual 'command'
|
||||
|
||||
it "loads submenus", ->
|
||||
contextMenu.add 'file-path',
|
||||
'.selector':
|
||||
'parent': [
|
||||
'child-1': 'child-1:trigger'
|
||||
'child-2': 'child-1:trigger'
|
||||
]
|
||||
'parent-2': 'parent-2:trigger'
|
||||
|
||||
|
||||
|
||||
describe 'dev mode', ->
|
||||
it 'loads', ->
|
||||
contextMenu.add 'file-path',
|
||||
|
@ -34,7 +34,7 @@ class ContextMenuManager
|
||||
add: (name, object, {devMode}={}) ->
|
||||
for selector, items of object
|
||||
for label, commandOrSubmenu of items
|
||||
if (typeof commandOrSubmenu == 'object')
|
||||
if typeof commandOrSubmenu is 'object'
|
||||
@addBySelector(selector, commandOrSubmenu, {devMode})
|
||||
else
|
||||
@addBySelector(selector, {label, commandOrSubmenu}, {devMode})
|
||||
|
Loading…
Reference in New Issue
Block a user