We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b8db9b commit c909094Copy full SHA for c909094
test/common/index.js
@@ -318,10 +318,15 @@ const knownGlobals = new Set([
318
'sessionStorage',
319
].forEach((i) => {
320
if (i === 'localStorage') {
321
- if (Object.hasOwn(globalThis, i)) {
322
- globalThis[i] = {};
323
- knownGlobals.add(globalThis[i]);
324
- }
+ Object.defineProperty(globalThis, i, {
+ configurable: true,
+ enumerable: true,
+ get() {
325
+ return undefined;
326
+ },
327
+ });
328
+
329
+ knownGlobals.add(globalThis[i]);
330
} else if (globalThis[i] !== undefined) {
331
knownGlobals.add(globalThis[i]);
332
}
0 commit comments