Skip to content

Commit

Permalink
fix: remove typeof window.document === 'undefined' check which deopt …
Browse files Browse the repository at this point in the history
…bundle optimization (#137)
  • Loading branch information
felixmosh committed Apr 18, 2024
1 parent 92ff754 commit 6c6bea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/getFetch.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c6bea0

Please sign in to comment.