diff --git a/lib/compress.js b/lib/compress.js index fe3d34b6213..ca23c40ee3f 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -628,7 +628,10 @@ merge(Compressor.prototype, { case "typeof": return typeof ev(e); case "void": return void ev(e); case "~": return ~ev(e); - case "-": return -ev(e); + case "-": + e = ev(e); + if (e === 0) throw def; + return -e; case "+": return +ev(e); } throw def;