$waitPromise should handle gracefully non promise.
This commit is contained in:
parent
3bc345d391
commit
826add7b43
@ -59,6 +59,9 @@ $waitEvent = (emitter, event) ->
|
||||
|
||||
# Waits for a promise to be fulfilled or broken.
|
||||
$waitPromise = (promise) ->
|
||||
# If it is not a promise, just forwards it.
|
||||
return promise unless $isPromise promise
|
||||
|
||||
fiber = $fiber.current
|
||||
|
||||
promise.then(
|
||||
|
Loading…
Reference in New Issue
Block a user