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
{{ message }}
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.
I'm getting a warning from Bluebird (the Promise lib) every time I use a Promise, e.g.:
Warning: a promise was created in a handler but was not returned from it
at EventLoop.done (/home/me/src/myproject/node_modules/zombie/lib/eventloop.js:589:11)
at EventLoop.g (events.js:260:16)
at emitNone (events.js:72:20)
at EventLoop.emit (events.js:166:7)
at Immediate._onImmediate (/home/me/src/myproject/node_modules/zombie/lib/eventloop.js:688:71)
at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
at Browser.wait (/home/me/src/myproject/node_modules/zombie/lib/index.js:341:145)
at lazyResolve (/home/me/src/myproject/node_modules/zombie/lib/index.js:390:40)
at Object.then (/home/me/src/myproject/node_modules/zombie/lib/index.js:397:18)
From previous event:
at Object.then (/home/me/src/myproject/node_modules/zombie/lib/index.js:397:32)
FYI, this is in a callback of a React JS application. So I don't want to return the Promise... React wouldn't do anything with it. I don't know what Bluebird expects, but I don't want to put a workaround of any kind in my app code.
There's no need for a polyfill, Node 4.x supports promises natively. Bluebird is only used in specific places where it adds value, like for browser.wait. You can turn off warnings, check the Bluebird documentation.
I'm getting a warning from Bluebird (the Promise lib) every time I use a Promise, e.g.:
FYI, this is in a callback of a React JS application. So I don't want to return the Promise... React wouldn't do anything with it. I don't know what Bluebird expects, but I don't want to put a workaround of any kind in my app code.
Is there a clean way to get rid of this warning ?
PS: BTW, Bluebird does a lot more that the Promise API: https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
Is using Bluebird really necessary? Why not just using a polyfill like https://github.com/taylorhakes/promise-polyfill ?
The text was updated successfully, but these errors were encountered: