ysmood / yaku

A lightweight promise library
https://tonicdev.com/ysmood/yaku
MIT License
290 stars 28 forks source link

0.18.3 is broken if window.Promise is set to Yaku #53

Closed kentor closed 7 years ago

kentor commented 7 years ago

If i do something like this as a polyfill:

window.Promise = require('yaku');

Then the recent change in 0.18.3 is broken: https://github.com/ysmood/yaku/commit/950101ff288cb3b0fc079736d8044a12492391f4

Shouldn't you capture window.Promise outside of the function in case it gets overridden?

ysmood commented 7 years ago

Well, that's a shame. I'll fix it.

ysmood commented 7 years ago

v0.18.4 published, a unit test was also added for it 😂

kentor commented 7 years ago

nice. thanks! :D