kriskowal / q

A promise library for JavaScript
MIT License
14.93k stars 1.2k forks source link

Q fails core-js Promise polyfill test #709

Open fixplz opened 9 years ago

fixplz commented 9 years ago

I want to use Q with Babel, which uses polyfills including this promise implementation: https://github.com/zloirock/core-js/blob/master/modules/es6.promise.js

However Q's then fails the check that p.then(...) instanceof p.constructor.

Is it congruent with Q's goals to fix this?

kriskowal commented 9 years ago

Yes, we should fix this.

markhalliwell commented 8 years ago

I almost opened a new issue, but I'm pretty sure I'm having the same issue. I had to add an if statement here since it fails the test otherwise: https://github.com/unicorn-fail/grunt-promise/blob/master/test/grunt-promise-test.js#L122-L130

Perhaps the issue title should be renamed to "Q obfuscates object inheritance" or something?

x-ref: #519

kriskowal commented 8 years ago

A PR is welcome.