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
Version (complete output of terser -V or specific git commit)
$ terser -Vterser 5.15.1
Complete CLI command or minify() options used
I turned off the unsafe option.
$ terser input.js -c unsafe=false
terser input
try{constx=0;x=x;}catch{console.log("caught");}
terser output or error
try{}catch{console.log("caught")}
Expected result
Executing the output code, caught is expected to be printed since catch block is executed in the input code (assignment to constant variable).
However, nothing is printed running the output code.
It seems that Terser compresses assignment expressions which might have side effects.
Activity