diff --git a/packages/utils/src/supports.ts b/packages/utils/src/supports.ts index 46a5c5901f5f..87a903fd6653 100644 --- a/packages/utils/src/supports.ts +++ b/packages/utils/src/supports.ts @@ -106,7 +106,7 @@ export function supportsNativeFetch(): boolean { // so create a "pure" iframe to see if that has native fetch let result = false; const doc = global.document; - if (doc) { + if (doc && typeof doc.createElement === 'function') { try { const sandbox = doc.createElement('iframe'); sandbox.hidden = true;