You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of bluebird is the issue happening on? v3.7.2
What platform and version? All
Did this issue happen with earlier version of bluebird? Not sure.
Using (deprecated) defer API and passing resolve anywhere without having a promise with it results in an error:
Uncaught TypeError: Cannot read property 'promise' of undefined
at deferResolve (node_modules/bluebird/js/release/promise.js:754:32)
at Timeout._onTimeout (test/index.test.ts:108:7)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
constbluebird=require('bluebird');const{
promise,
resolve,}=bluebird.defer();resolve();/*Uncaught:TypeError: Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead. See http://goo.gl/sdkXL9 at PromiseResolver.resolve.PromiseResolver.fulfill (/home/rauno/projects/bluebird/node_modules/bluebird/js/main/promise_resolver.js:88:15)*/
Running only this example actually surprisingly gives me a different error from what I previously saw in the wild.
Would you consider accepting a patch that binds the callbacks to the promise?
The text was updated successfully, but these errors were encountered:
What version of bluebird is the issue happening on? v3.7.2
What platform and version? All
Did this issue happen with earlier version of bluebird? Not sure.
Using (deprecated) defer API and passing resolve anywhere without having a promise with it results in an error:
That's where resolve and reject are defined:
To reproduce
Running only this example actually surprisingly gives me a different error from what I previously saw in the wild.
Would you consider accepting a patch that binds the callbacks to the promise?
The text was updated successfully, but these errors were encountered: