Skip to content

Scheduling infrastructure for absolutely everyone.

fix: disable useGetOAuthClientManagedUsers if clientId not defined (#15040)

Morgan973b62488287
diff --git a/apps/web/lib/hooks/settings/platform/oauth-clients/useOAuthClients.ts b/apps/web/lib/hooks/settings/platform/oauth-clients/useOAuthClients.ts
index 31843969727..5201e9d0515 100644
--- a/apps/web/lib/hooks/settings/platform/oauth-clients/useOAuthClients.ts
+++ b/apps/web/lib/hooks/settings/platform/oauth-clients/useOAuthClients.ts
@@ -77,6 +77,7 @@ export const useGetOAuthClientManagedUsers = (clientId: string) => {
headers: { "Content-type": "application/json" },
}).then((res) => res.json());
},
+ enabled: Boolean(clientId),
});
return { isLoading, error, data: response?.data, refetch };