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

Promise.finally is undefined #983

Closed
luhc228 opened this issue Sep 14, 2021 · 4 comments
Closed

Promise.finally is undefined #983

luhc228 opened this issue Sep 14, 2021 · 4 comments
Labels

Comments

@luhc228
Copy link

luhc228 commented Sep 14, 2021

When I set the "useBuiltIns": "entry", the Promise.prototype.finally is undefined. When I set the "useBuiltIns": "usage",I can use the promise.prototype.finally.

how to solve this problem.

related issues:

@zloirock
Copy link
Owner

When you use "useBuiltIns": "entry", you should import required modules by yourself, for example, use import 'core-js/stable', and preset-env will optimize it.

@luhc228
Copy link
Author

luhc228 commented Sep 14, 2021

The order may not be right now. The Promise.finally is before the Promise, which will be overrided.

ref: babel/babel#11742 (comment)

@zloirock
Copy link
Owner

In this case, it's a Babel issue, you could report it here https://github.com/babel/babel-polyfills/

@luhc228
Copy link
Author

luhc228 commented Sep 14, 2021

It's my problem. Thank you.

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

No branches or pull requests

2 participants