-
-
Notifications
You must be signed in to change notification settings - Fork 23
Not compatible with global Bluebird promises #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's like this because properly subclassing |
@fluggo The code you posted may work differently depending on whether you transpile it (native @sindresorhus Promise class inheritance is stable now with I checked this issue for another reason. PC is currently incompatible with BB cancellation, http://bluebirdjs.com/docs/api/cancellation.html . It doesn't propagate cancelability to promise chain (this could be the subject for |
@bisubus It's incompatible because Bluebird expects |
@fluggo It may fail in some more complicated cases where BB relies on |
@bisubus Bluebird uses |
This library, and therefore got, can't be used in a program that uses Bluebird promises globally. This is because PCancelable amends its prototype tree to make it a subclass of Promise but never calls the base Promise constructor, making it a false subclass.
The following code demonstrates this:
The code produces no output. It should print
true
.The text was updated successfully, but these errors were encountered: