From 632d1b6842dc8bf8bc5ae1e9347545fe0cee4093 Mon Sep 17 00:00:00 2001 From: Princesseuh Date: Fri, 18 Aug 2023 18:39:10 +0200 Subject: [PATCH] fix(polyfills): Use object shape for Stackblitz polyfill list --- packages/astro/src/core/polyfill.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/core/polyfill.ts b/packages/astro/src/core/polyfill.ts index 053570cc24..ea7916eb37 100644 --- a/packages/astro/src/core/polyfill.ts +++ b/packages/astro/src/core/polyfill.ts @@ -24,7 +24,7 @@ const isStackblitz = process.env.SHELL === '/bin/jsh' && process.versions.webcon export function apply() { if (isStackblitz) { - const neededPolyfills = [ + const neededPolyfills = { ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, @@ -43,7 +43,7 @@ export function apply() { Request, Response, fetch, - ]; + }; for (let polyfillName of Object.keys(neededPolyfills)) { if (Object.hasOwnProperty.call(globalThis, polyfillName)) continue;