Skip to content

Commit 55c6fd6

Browse files
committed
change to use default export from 'cross-fetch'
1 parent 3ed1614 commit 55c6fd6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/plugins/swr/src/runtime/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export async function fetcher<R, C extends boolean>(
386386
(typeof fetch === 'function'
387387
? fetch
388388
: // fallback to 'cross-fetch' if otherwise
389-
(await import('cross-fetch')).fetch);
389+
(await import('cross-fetch')).default);
390390

391391
const res = await _fetch(url, options);
392392
if (!res.ok) {

packages/plugins/tanstack-query/src/runtime/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export async function fetcher<R, C extends boolean>(
143143
(typeof fetch === 'function'
144144
? fetch
145145
: // fallback to 'cross-fetch' if otherwise
146-
(await import('cross-fetch')).fetch);
146+
(await import('cross-fetch')).default);
147147

148148
const res = await _fetch(url, options);
149149
if (!res.ok) {

0 commit comments

Comments
 (0)