One broken menu item shouldn't kill the whole menu.
This commit is contained in:
parent
1c6d093311
commit
73af23bcfb
@ -102,7 +102,13 @@ UI = do ->
|
||||
|
||||
insertEntry: (entry, parent, data) ->
|
||||
if typeof entry.open is 'function'
|
||||
return unless entry.open data
|
||||
try
|
||||
return unless entry.open data
|
||||
catch err
|
||||
Main.handleErrors
|
||||
message: "\"#{entry.el.textContent}\" menu entry crashed."
|
||||
error: err
|
||||
return
|
||||
$.add parent, entry.el
|
||||
|
||||
return unless entry.subEntries
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user