-
Heh. I just found out that returning a promise in
new Promise()
never resolves, but returning a promise in.then()
does. Feels inconsistent but both Chrome and FF behave the same. @jaffathecake thoughts? -
Ok @slightlylate offered some useful insights. TL;DR is that
new Promise()
accepts a function that only resolves (or rejects) when the resolve() or reject() callbacks are called. Having it both (callbacks and return) could cause issues like the example below.