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
REPL preview causes unwanted side effects like deletion of unexpected objects #59735
Linux hostname 6.14.11-300.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jun 10 16:24:16 UTC 2025 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Start an interactive REPL session
Type delete globalThis._ but don't press enter
Backspace until the line is empty
Type globalThis and press enter
How often does it reproduce? Is there a required condition?
Reliably reproducible. The REPL preview needs to be enabled; it does not reproduce with TERM=dumb. Not reproducible with 22.18.0.
What is the expected behavior? Why is that the expected behavior?
I would expect that the delete expression doesn't actually cause any deletion during evaluation for the preview. Failing that, I would expect that _ (which initially doesn't exist) would be deleted from the global scope.
What do you see instead?
> globalThis
Uncaught ReferenceError: globalThis is not defined
Activity
repl: fix REPL completion under unary expressions
repl: fix REPL completion under unary expressions