diff --git a/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-config-only-properties.js b/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-config-only-properties.js index c126668e99..6b6857f6c1 100644 --- a/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-config-only-properties.js +++ b/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-config-only-properties.js @@ -73,7 +73,7 @@ const result = r.evaluate(` ]; // Delete every name except globalThis, for now - names.filter(name => { + const remainingNames = names.filter(name => { if (esNonConfigValues.includes(name)) { return false; } @@ -85,12 +85,12 @@ const result = r.evaluate(` }); delete globalThis['globalThis']; - + if (hasOwn.call(savedGlobal, 'globalThis')) { - names.push('globalThis'); + remainingNames.push('globalThis'); } - const failedDelete = names.join(', '); + const failedDelete = remainingNames.join(', '); failedDelete; `);