Confusion about object prototype

Is the Function node involved at all?

This type of error can be caused by a gotcha with the Sandbox used inside the Function node.

The Sandbox gets its very own instance of Object. That means the prototype of an object created inside the Function node will not be the exact same thing as the prototype of the Object outside of the Sandbox.

The prototypes will be identical - but they will be separate instances of it - so the strict equality check will fail.

1 Like