-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird Proxy internal util.inspect error #25212
Comments
The reason is that the Proxy makes all properties in And it can be reproduced in chrome: let thing;
thing = new Proxy(() => {}, {
get() {
return thing;
},
apply() {
return thing;
}
});
console.log(String(thing))
// Uncaught TypeError: Cannot convert object to primitive value
// at String (<anonymous>)
// at <anonymous>:11:13 |
3 tasks
refack
pushed a commit
to refack/node
that referenced
this issue
Jan 14, 2019
PR-URL: nodejs#25244 Fixes: nodejs#25212 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
4 tasks
BridgeAR
added a commit
to BridgeAR/node
that referenced
this issue
Feb 28, 2019
This prevents any proxy traps from being called while inspecting proxy objects. That guarantees a side-effect free way of inspecting proxies. Refs: nodejs#25212 Refs: nodejs#24765 Fixes: nodejs#10731 Fixes: nodejs#26231
BridgeAR
added a commit
to BridgeAR/node
that referenced
this issue
Feb 28, 2019
This prevents any proxy traps from being called while inspecting proxy objects. That guarantees a side-effect free way of inspecting proxies. PR-URL: nodejs#26241 Fixes: nodejs#10731 Fixes: nodejs#26231 Refs: nodejs#25212 Refs: nodejs#24765 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code:
emits the following error when executed:
If I remove either the
get()
or theapply()
it works, but when both are set it errors.The text was updated successfully, but these errors were encountered: