From 86ba0766fc2d2e3add8e99e2f7f66d52a90e49ff Mon Sep 17 00:00:00 2001 From: Afzal Sayed <14029371+afzalsayed96@users.noreply.github.com> Date: Sat, 24 Jun 2023 00:48:38 +0400 Subject: [PATCH] Prevent invalid api call (#9757) --- packages/features/ee/teams/pages/team-profile-view.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/features/ee/teams/pages/team-profile-view.tsx b/packages/features/ee/teams/pages/team-profile-view.tsx index acd3b3f70e..9923a268f0 100644 --- a/packages/features/ee/teams/pages/team-profile-view.tsx +++ b/packages/features/ee/teams/pages/team-profile-view.tsx @@ -79,6 +79,7 @@ const ProfileView = () => { const { data: team, isLoading } = trpc.viewer.teams.get.useQuery( { teamId: Number(router.query.id) }, { + enabled: !!router.query.id, onError: () => { router.push("/settings"); },