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
Cannot redefine a property on vm's globalThis #47799
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Outputs "2"
What do you see instead?
Outputs "1"
Additional information
This reproduces in every version I've tested back to v16.20.0.
This does not reproduce if you replace window in the above with context, i.e. it's specific to what happens when you pull out the inner globalThis value. (However, pulling out that value is crucial for jsdom's use cases.)
Activity
targos commentedon May 1, 2023
@nodejs/vm
fhinkel commentedon Jan 29, 2024
My gut feeling is that this is an upstream bug.As a work around, adding
writable: truein addition toconfigurableresults in the expected updated value forwindow.x.src: fix vm bug for configurable globalThis
src: fix vm bug for configurable globalThis
src: fix vm bug for configurable globalThis