Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Labels
replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.
Description
Version
23.10.0
Platform
Darwin LM-JNVH7RPW6J 23.6.0 Darwin Kernel Version 23.6.0: Thu Dec 19 20:47:53 PST 2024; root:xnu-10063.141.1.703.2~1/RELEASE_ARM64_T6030 arm64 Subsystem
repl
What steps will reproduce the bug?
- Open the repl ( type
node) - Paste the following code
consthandler={get(target,prop,receiver){console.log(`Accessed prop: ${String(prop)}`);returnnewProxy(function(){},{apply: function(_target,_thisArg,args){console.log(`Called function: ${String(prop)} with args:`,args);return`Result of calling ${prop}`;},get: function(_target,subProp){console.log(`Accessed nested prop: ${String(subProp)} on ${String(prop)}`);return`Nested value of ${subProp}`;}});}};constobj=newProxy({},handler);- Try to access a nested prop like
obj.hello.world.
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
It should allow me to type something like obj.hello.world.
What do you see instead?
I can type obj.hello but once I type the other dot, it already triggers the proxy. See the video:
node-repl-proxy-issue.mov
Additional information
No response
Metadata
Metadata
Assignees
Labels
replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.