Skip to content

Commit b957c17

Browse files
committed
fix: remove newClient from useSWR: client already exists there
1 parent b02eb7b commit b957c17

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/swr.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { writable } from "svelte/store";
44

55
import { swrMachine } from "./machine";
66
import { getClient } from "./context";
7-
import { newClient } from "./client";
87

98
interface SWROptions<T> {
109
enabled?: boolean;
@@ -45,7 +44,7 @@ const defaultSWRParams = {
4544
};
4645

4746
export function useSWR<T>(): SWRStore<T> {
48-
const client = getClient() || newClient({});
47+
const client = getClient();
4948

5049
const store = writable<Context<T>>({ ...defaultSWRStore });
5150

0 commit comments

Comments
 (0)