Skip to content

Commit

Permalink
change to use default export from 'cross-fetch'
Browse files Browse the repository at this point in the history
  • Loading branch information
ymc9 committed Nov 2, 2024
1 parent 3ed1614 commit 55c6fd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/plugins/swr/src/runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ export async function fetcher<R, C extends boolean>(
(typeof fetch === 'function'
? fetch
: // fallback to 'cross-fetch' if otherwise
(await import('cross-fetch')).fetch);
(await import('cross-fetch')).default);

const res = await _fetch(url, options);
if (!res.ok) {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/tanstack-query/src/runtime/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export async function fetcher<R, C extends boolean>(
(typeof fetch === 'function'
? fetch
: // fallback to 'cross-fetch' if otherwise
(await import('cross-fetch')).fetch);
(await import('cross-fetch')).default);

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

0 comments on commit 55c6fd6

Please sign in to comment.