mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 05:11:49 +01:00
Clean up company selection loading guard
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
53dc96aeb5
commit
b7deb3187b
1 file changed
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user