You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uglify is aware of the negative condition optimization. This issue is occurring because the length of the original condition 1==a||2==b and the negated condition 1!=a&&2!=b are the same so uglify bases its optimization on the original. But the code doesn't take into account that || has lower precedence than && in the expression (1==a||2==b)&&foo();, and as such the solution with the original condition is 2 (paren) characters longer than the solution with the negated condition 1!=a&&2!=b||foo();
Consider this simple code
It gets compressed to
This is not optimal.
1!=a&&2!=b||foo();
is shorter.Strange enough, I found that when compressing the equivalent code
the result is indeed
as requested.
The text was updated successfully, but these errors were encountered: