mirror of
https://github.com/atom/atom.git
synced 2026-02-15 17:15:24 -05:00
Change Workspace::reopenItemSync to use promises
This commit is contained in:
@@ -167,9 +167,13 @@ class Workspace extends Model
|
||||
|
||||
# Public: Reopen the last-closed item's URI if it hasn't already been
|
||||
# reopened.
|
||||
reopenItemSync: ->
|
||||
#
|
||||
# Returns a promise that is resolved when the item is opened
|
||||
reopenItem: ->
|
||||
if uri = @destroyedItemUris.pop()
|
||||
@openSync(uri)
|
||||
@open(uri)
|
||||
else
|
||||
Q()
|
||||
|
||||
# Public: Register an opener for a uri.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user