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

The order of promise and promise.finally after compilation seems to be wrong #77

Closed
1 task
niuxinyu opened this issue Mar 17, 2021 · 1 comment · Fixed by #78
Closed
1 task

The order of promise and promise.finally after compilation seems to be wrong #77

niuxinyu opened this issue Mar 17, 2021 · 1 comment · Fixed by #78
Labels
bug Something isn't working

Comments

@niuxinyu
Copy link

Bug Report

  • I would like to work on a fix!

Input Code

Promise.resolve(123).finally(() => console.log('finally'))

Expected behavior

After compiling I got like

image

It can not work at ie11

image

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

  • Filename: .babelrc

image

Environment

  • Babel version(s): v7.13.10
  • Node/npm version: Node v12.18.0/npm v6.14.8
  • OS: macOS 10.15.7
  • Monorepo: no
  • How you are using Babel: babel-cli

Here are all the packages i installed

image

Possible Solution

When I reverse the order of the two lines of code, it can run normally

image

@babel-bot
Copy link

Hey @niuxinyu! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants