mishoo/UglifyJS — Issue #243: "if (v) debugger" doesn't uglify well
Author: jdelStrother
Created: 2011-10-11 18:43:23+00:00
State: open

Heya,
Uglify converts an expression like `if (value) debugger` into `value&&debugger`. Which (at least in Chrome & Firefox) raises a syntax error - 'Unexpected token debugger'.

It could perhaps be argued that the debugger statement shouldn't be in minified production code, but it caught me by surprise & took quite a while to track down the syntax error in the minified js. Any thoughts?