diff --git a/ui/src/context/CompanyContext.tsx b/ui/src/context/CompanyContext.tsx index e54a550fb44..18a043f0c35 100644 --- a/ui/src/context/CompanyContext.tsx +++ b/ui/src/context/CompanyContext.tsx @@ -94,7 +94,7 @@ export function CompanyProvider({ children }: { children: ReactNode }) { useEffect(() => { if (isLoading) return; if (companies.length === 0) { - if (shouldClearStoredCompanySelection({ companies, isLoading, unauthorized: companyListUnauthorized })) { + if (shouldClearStoredCompanySelection({ companies, isLoading: false, unauthorized: companyListUnauthorized })) { if (selectedCompanyId !== null) { setSelectedCompanyIdState(null); }