Skip to content

Commit a045950

Browse files
fix: fetch race condition (#326)
1 parent d6c271d commit a045950

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/api/useApiResource.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export const useApiResource = <T>(
1919
const apiConfig = useContext(ApiConfigContext);
2020

2121
const { data, error, isLoading, isValidating } = useSWR(
22-
disable || resource.path === null ? null : [resource.path, apiConfig],
23-
([path, apiConfig]) =>
22+
disable || resource.path === null ? null : [resource.path, apiConfig, excludeMcpConfig],
23+
([path, apiConfig, excludeMcpConfig]) =>
2424
fetchApiServerJson<T>(
2525
path,
2626
excludeMcpConfig ? { ...apiConfig, mcpConfig: undefined } : apiConfig,

0 commit comments

Comments
 (0)