One problem I see is that `done` doesn’t return a promise; it returns `undefined`. So inside `allPromises`, your `promise` variable is just `undefined`. You’ll want to use `then` if you plan on giving the promise to another consumer, such as `allResolved`.
From: q-con...@googlegroups.com [mailto:q-con...@googlegroups.com]
On Behalf Of Brian Deitte
Sent: Wednesday, May 1, 2013 20:53
To: q-con...@googlegroups.com
Subject: [Q] Using Q.allResolved and when promises resolve
Hi,
I have a fairly simple example using allResolved which isn't working as I expect:
Apologies if this is something obvious, as I'm fairly new at using Q. I have been fiddling around with this example for quite awhile and figure out a way to always get "done with everything" to appear last (well, with the delay in there). Thanks for any help here.
-Brian
--
You received this message because you are subscribed to the Google Groups "Q Continuum (JavaScript)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
q-continuum...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.