The code supplied here results in only the "outer" being called:
recursivePromise = promises.resolve(true)
promises.onFinally(recursivePromise, sub(recursivePromise as dynamic)
print "outer"
promises.onThen(recursivePromise, sub(recursivePromise as dynamic)
print "inner"
end sub)
end sub, recursivePromise)
This PR addresses a case where registering listeners from within a callback on the same promise fails to correctly notify all the listeners.
The code supplied here results in only the
"outer"
being called:This PR addresses a case where registering listeners from within a callback on the same promise fails to correctly notify all the listeners.