Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/utils/connect/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { LibraryError } from '../errors';

export default (typeof globalThis !== 'undefined' && globalThis.fetch.bind(globalThis)) ||
(typeof window !== 'undefined' && window.fetch.bind(window)) ||
(typeof global !== 'undefined' && global.fetch.bind(global)) ||
export default (typeof globalThis?.fetch !== 'undefined' && globalThis.fetch.bind(globalThis)) ||
(typeof window?.fetch !== 'undefined' && window.fetch.bind(window)) ||
(typeof global?.fetch !== 'undefined' && global.fetch.bind(global)) ||
((() => {
throw new LibraryError(
"'fetch()' not detected, use the 'baseFetch' constructor parameter to set it"
Expand Down