-
Notifications
You must be signed in to change notification settings - Fork 297
Array converted to an array-like Object #437
Comments
Here are a couple more examples (resembles my own use case better) that yield the same error: Example 1:
Example 2:
|
This is a node bug. const assert = require('assert').strict;
const res = new Proxy([1,2,3],{
ownKeys(target){
return Reflect.ownKeys(target);
}
});
assert.deepEqual(res,[1,2,3]); When one removes the |
Thanks for the reply @XmiliaH. |
I tried to fix this issue already, but it broke other functionalities. |
For those who are interested, I found a workaround which solves my use case. The solution is to unproxify the returned object from For the sake of completeness, here are the examples above with the solution integrated in them, feel free to copy-paste them into here and check them out for yourself.
Example 2:
Example 3:
Note 1: Note 2:
|
Hi, I have this issue.
To reproduce, please run this code: (you can run it for example here)
It yields this error:
I believe this problem is closely related to this issue, where collaborator @XmiliaH wrote
This is back for all versions as the fix broke Object.keys. As this is only a issue when logging objects this is acceptable.
However, as you can see, this is not only a logging issue.
The text was updated successfully, but these errors were encountered: