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
e === null || e === undefined compiles to e == null, which evaluates e once #9355
The JS printer turns e === null || e === undefined into e == null when the two operands are the same expression. That evaluates e once instead of twice, which changes the result when e has side effects.
This prints false 1. It should print true 2: the first next() returns 1 and the second undefined.
The rewrite is the Bin (Or, Bin (EqEqEq, e1, Null), Bin (EqEqEq, e2, Undefined)) case of expression_desc in js_dump.ml. It should apply only when e1 has no side effects.
Activity