mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
fix(polyfills): Use object shape for Stackblitz polyfill list
This commit is contained in:
parent
db39206cbb
commit
632d1b6842
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ const isStackblitz = process.env.SHELL === '/bin/jsh' && process.versions.webcon
|
||||||
|
|
||||||
export function apply() {
|
export function apply() {
|
||||||
if (isStackblitz) {
|
if (isStackblitz) {
|
||||||
const neededPolyfills = [
|
const neededPolyfills = {
|
||||||
ByteLengthQueuingStrategy,
|
ByteLengthQueuingStrategy,
|
||||||
CountQueuingStrategy,
|
CountQueuingStrategy,
|
||||||
ReadableByteStreamController,
|
ReadableByteStreamController,
|
||||||
|
@ -43,7 +43,7 @@ export function apply() {
|
||||||
Request,
|
Request,
|
||||||
Response,
|
Response,
|
||||||
fetch,
|
fetch,
|
||||||
];
|
};
|
||||||
|
|
||||||
for (let polyfillName of Object.keys(neededPolyfills)) {
|
for (let polyfillName of Object.keys(neededPolyfills)) {
|
||||||
if (Object.hasOwnProperty.call(globalThis, polyfillName)) continue;
|
if (Object.hasOwnProperty.call(globalThis, polyfillName)) continue;
|
||||||
|
|
Loading…
Reference in a new issue