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

UglifyJS version 3.4.9 changes behavior of code. #3314

Closed
MR-fisher opened this issue Jan 15, 2019 · 0 comments · Fixed by #3333
Closed

UglifyJS version 3.4.9 changes behavior of code. #3314

MR-fisher opened this issue Jan 15, 2019 · 0 comments · Fixed by #3333

Comments

@MR-fisher
Copy link

MR-fisher commented Jan 15, 2019

Bug report

Uglify version 3.4.9

JavaScript input

// test.js
var a, b, c;
function test() {
  console.log(arguments[0])
}
if (1 == c) {
  a = 1;
  b = 2;
} else {
  a = 0;
  b = 1;
}
test(a, b, 3);

The uglifyjs CLI command executed or minify() options used.

uglifyjs test.js -c -m -o test.min.js

JavaScript output or error produced.

// test.min.js
var a,b,c;function test(){console.log(arguments[0])}test(a,b=1==c?(a=1,2):(a=0,1),3);

Expect the console to print 0, but actually print undefined.

Sorry my english.

alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Mar 13, 2019
alexlamsl added a commit that referenced this issue Mar 13, 2019
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

Successfully merging a pull request may close this issue.

1 participant