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
{{ message }}
Repository navigation
[Bug] terser incorrectly removes ReferenceError for computed property using class name #1593
Terser incorrectly optimizes a class with a computed property key when the key references the class name itself. This results in an output that no longer throws a ReferenceError.
terser input:
I used terser REPL to reproduce the bug with the following input:
classx{[!{ x }];}newx
This input script throws ReferenceError:
❯ node input.js
class x { [ ! { x } ] ; }
^
ReferenceError: Cannot access 'x' before initialization
Node.js v22.9.0
terser output
classs{[!1]}news;
The output executes normally without throwing an error.
Activity
fix(compress): preserve reads in the temporal dead zone (terser#1593)