-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
if expression not minified correctly #12
Labels
bug
Something isn't working
Comments
coderaiser
added a commit
to coderaiser/putout
that referenced
this issue
Jun 5, 2024
coderaiser
added a commit
to coderaiser/putout
that referenced
this issue
Jun 5, 2024
coderaiser
added a commit
that referenced
this issue
Jun 5, 2024
Thank you! Just fixed and landed in Is it works for you? |
The test file works, but the actual code still does not. I'll see if I can come up with another test case later... |
Turns out it was just a simple matter of adding another condition: if (var1 || (var2 && var3)) {
fn1();
if (var4) {
fn2();
}
} becomes: var1||(var2&&var3)&&(fn1(),var4&&fn2()); where the brackets are missing, again. |
coderaiser
added a commit
that referenced
this issue
Jun 5, 2024
Landed in v3.12.1 🎉. Is it works for you? |
Yep, that got it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This expression:
incorrectly minifies to:
when it should be:
as it is when using the terser type.
The text was updated successfully, but these errors were encountered: