We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello.
I made a minimal example demonstrating the problem: https://github.com/Katarn/fast-async-bug.
Code from this file: https://github.com/Katarn/fast-async-bug/blob/master/src/index.js transpiled in the following code:
// <...> "use strict"; // <...> var MyClass = function () { function MyClass() { _classCallCheck(this, MyClass); } _createClass(MyClass, [{ key: "run", value: function run() { return new Promise(function ($return, $error) { if (false) {} else { if (false) {} else { return Promise.resolve(console.log("if block 3")).then(function ($await_5) { try { return $If_2.call(this); } catch ($boundEx) { return $error($boundEx); } }.bind(this), $error); } function $If_2() { return $If_1.call(this); } } function $If_1() { return $return(); } }); } }]); return MyClass; }(); // <...>
When I run it in an old browser that the @babel/preset-env polyfill is intended for, I get the following error in the console:
@babel/preset-env
Uncaught SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function.
You can reproduce the bug on Chromium build 205xxx and less, for example, from here: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win/. There are builds for other operating systems also.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello.
I made a minimal example demonstrating the problem: https://github.com/Katarn/fast-async-bug.
Code from this file: https://github.com/Katarn/fast-async-bug/blob/master/src/index.js transpiled in the following code:
When I run it in an old browser that the
@babel/preset-env
polyfill is intended for, I get the following error in the console:You can reproduce the bug on Chromium build 205xxx and less, for example, from here: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win/. There are builds for other operating systems also.
The text was updated successfully, but these errors were encountered: