Skip to content
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

use native check will always fail #221

Closed
ishowshao opened this issue Jul 20, 2016 · 1 comment
Closed

use native check will always fail #221

ishowshao opened this issue Jul 20, 2016 · 1 comment

Comments

@ishowshao
Copy link

var USE_NATIVE = !!function(){
  try {
    // correct subclassing with @@species support
    var promise     = $Promise.resolve(1)
      , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };
    // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
    return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
  } catch(e){ /* empty */ }
}();

this use native check will always fail because promise.then(empty) will throw error

so it will always use babel's Promise, but babel's Promise has bug in iOS9.3 webview, Promise.resolve not resolving when page scrolling

@zloirock
Copy link
Owner

Native check correctly fails because this promise implementation does not support @@species pattern and unhandled rejection tracking. If you have an issue with "babel's Promise bug in iOS9.3 webview" - please, open issue about it, add details and reproducible example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants