mirror of
https://github.com/atom/atom.git
synced 2026-01-25 14:59:03 -05:00
modal selector 'url' can be a function
This commit is contained in:
@@ -88,7 +88,11 @@ class ModalSelector extends Modal
|
||||
|
||||
openSelected: ->
|
||||
text = $('#modal-selector .selected').text()
|
||||
window.open _.find(@list, (item) -> item.name is text).url
|
||||
{url} = _.find @list, (item) -> item.name is text
|
||||
if typeof url is 'function'
|
||||
url()
|
||||
else
|
||||
window.open url
|
||||
@toggle()
|
||||
|
||||
moveUp: ->
|
||||
|
||||
Reference in New Issue
Block a user