fix(useFetch): use globalThis.fetch when defaultWindow.fetch not … · vueuse/vueuse@bf35416 (original) (raw)

Commit bf35416

fix(useFetch): use globalThis.fetch when defaultWindow.fetch not exist (#4765)

Co-authored-by: Naily zero@naily.cc Co-authored-by: Robin robin.kehl@singular-it.de

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 1 addition & 1 deletion

Original file line number Diff line number Diff line change
@@ -371,7 +371,7 @@ export function useFetch(url: MaybeRefOrGetter, ...args: any[]): UseF
371 371 }
372 372
373 373 const {
374 - fetch = defaultWindow?.fetch,
374 + fetch = defaultWindow?.fetch ?? globalThis?.fetch,
375 375 initialData,
376 376 timeout,
377 377 } = options

0 commit comments