One broken menu item shouldn't kill the whole menu.

This commit is contained in:
ccd0 2015-08-15 23:11:47 -07:00
parent 1c6d093311
commit 73af23bcfb

View File

@ -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