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
I am using the latest version of Nuglify.
The code
function Test(iterable) { for (let value of Object.values(iterable)) { console.log(value); } } Test({ foo: 10, bar: 12 });
Is being minified to:
function Test(n) { for (let n of Object.values(n)) console.log(n) } Test({ foo: 10, bar: 12 })
which results in the error:
Uncaught ReferenceError: Cannot access 'n' before initialization
Expected output would be:
function Test(n) { for (let o of Object.values(n)) console.log(o) } Test({ foo: 10, bar: 12 })
The latest version of uglify (3.17.4) in Debian produces the expected output.
My "workaround is to use var instead of let:
function Test(iterable) { for (var value of Object.values(iterable)) { console.log(value); } } Test({ foo: 10, bar: 12 });
The text was updated successfully, but these errors were encountered:
yep, its let/const that cause this, var is the workaround.
let
const
var
PRs welcome
Sorry, something went wrong.
No branches or pull requests
I am using the latest version of Nuglify.
The code
Is being minified to:
which results in the error:
Uncaught ReferenceError: Cannot access 'n' before initialization
Expected output would be:
The latest version of uglify (3.17.4) in Debian produces the expected output.
My "workaround is to use var instead of let:
The text was updated successfully, but these errors were encountered: