Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf35416

Browse files
GroupguanfangnailiableOrbisK
authored
fix(useFetch): use globalThis.fetch when defaultWindow.fetch not exist (#4765)
Co-authored-by: Naily <[email protected]> Co-authored-by: Robin <[email protected]>
1 parent 217cc54 commit bf35416

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/useFetch/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ export function useFetch<T>(url: MaybeRefOrGetter<string>, ...args: any[]): UseF
371371
}
372372

373373
const {
374-
fetch = defaultWindow?.fetch,
374+
fetch = defaultWindow?.fetch ?? globalThis?.fetch,
375375
initialData,
376376
timeout,
377377
} = options

0 commit comments

Comments
 (0)