The utils loader currently does an instanceof check against the builtin Promise type. This doesn't work with wrapped promises, bluebird promises or other custom promises.
By wrapping the source() result in a Promise.reslove(), instead of the instanceof check, we're making sure that we're working with a promise.
I've added a specific testcase for a custom thenable that works with this patch.
Related to https://github.com/jackocnr/intl-tel-input/issues/1877 This solves the issue that angular can't load the utils script because zone.js wraps promises.
The utils loader currently does an instanceof check against the builtin Promise type. This doesn't work with wrapped promises, bluebird promises or other custom promises.
By wrapping the source() result in a
Promise.reslove()
, instead of the instanceof check, we're making sure that we're working with a promise.I've added a specific testcase for a custom thenable that works with this patch.