Rich-Harris / butternut

The fast, future-friendly minifier
https://butternut.now.sh
MIT License
1.17k stars 17 forks source link

Bug: Nested empty conditions #164

Closed loilo closed 7 years ago

loilo commented 7 years ago

Butternut hiccups on nested if blocks with no statements inside.

Input:

if ( any_condition_1 ) {
  if ( any_condition_2 ) {

  }
}

Output Butternut 0.4.6:

any_condition_1&&()

Output UglifyJS 3.0.8:

any_condition_1&&any_condition_2;
nifgraup commented 7 years ago

duplicates #127

loilo commented 7 years ago

That's right. Closing in favor of #127 then.