From 6c6bea00df31cb6f9d49ad4167ec9a62fefe23b2 Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Thu, 18 Apr 2024 19:11:23 +0300 Subject: [PATCH] fix: remove typeof window.document === 'undefined' check which deopt bundle optimization (#137) --- lib/getFetch.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/getFetch.cjs b/lib/getFetch.cjs index 2cb1855..de5a5aa 100644 --- a/lib/getFetch.cjs +++ b/lib/getFetch.cjs @@ -10,7 +10,7 @@ if (typeof fetch === 'function') { } } -if (typeof require !== 'undefined' && (typeof window === 'undefined' || typeof window.document === 'undefined')) { +if (typeof require !== 'undefined' && typeof window === 'undefined') { var f = fetchApi || require('cross-fetch') if (f.default) f = f.default exports.default = f