From d25516056cfd528eaf38be145ab27a4e95c0c2bd Mon Sep 17 00:00:00 2001 From: James Gatz Date: Thu, 24 Jul 2025 15:20:06 +0200 Subject: [PATCH] fix(GitRemoteBranchSelect): update fetcher key to use deferred URL value (#8905) --- .../components/git-credentials/git-remote-branch-select.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/insomnia/src/ui/components/git-credentials/git-remote-branch-select.tsx b/packages/insomnia/src/ui/components/git-credentials/git-remote-branch-select.tsx index 82956f7835..4a73736103 100644 --- a/packages/insomnia/src/ui/components/git-credentials/git-remote-branch-select.tsx +++ b/packages/insomnia/src/ui/components/git-credentials/git-remote-branch-select.tsx @@ -14,11 +14,11 @@ export const GitRemoteBranchSelect = ({ isDisabled: boolean; credentials: GitCredentials; }) => { - const remoteBranchesFetcher = useFetcher<{ branches: string[] }>({ key: url || 'branch-select' }); + const uri = useDeferredValue(url); + const remoteBranchesFetcher = useFetcher<{ branches: string[] }>({ key: `branch-select:${uri}` }); const { organizationId } = useParams<{ organizationId: string }>(); const isLoadingRemoteBranches = remoteBranchesFetcher.state !== 'idle'; - const uri = useDeferredValue(url); useEffect(() => { if (uri && remoteBranchesFetcher.state === 'idle' && !remoteBranchesFetcher.data) {