Promise rejections don't resolve the argument

raul mihaila raul.mihaila at gmail.com
Sun Dec 28 04:44:04 PST 2014


Can somebody please provide a rationale for why promise reject functions
don't resolve the argument, if the argument is a promise, before they pass
it to the handlers, like promise resolve functions do?

Promise.resolve(Promise.reject(3)).catch(console.log.bind(console)) // logs
3
Promise.reject(Promise.resolve(2)).catch(console.log.bind(console)) // logs
a promise

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141228/59a23a54/attachment.html>


More information about the es-discuss mailing list