Clean up company selection loading guard

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-04-27 13:00:09 -05:00
1 parent 53dc96aeb5
commit b7deb3187b
1 file changed
+1 -1
+1 -1
View File
@@ -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);
}