Fix TypeError

This commit is contained in:
Arunavo Ray
2025-07-26 17:08:13 +05:30
parent 465c812e7e
commit 3ff15a46e7

View File

@@ -106,7 +106,7 @@ export function SSOSettings() {
apiRequest<{ enabled: boolean }>('/auth/header-status').catch(() => ({ enabled: false })) apiRequest<{ enabled: boolean }>('/auth/header-status').catch(() => ({ enabled: false }))
]); ]);
setProviders(providersRes); setProviders(Array.isArray(providersRes) ? providersRes : providersRes?.providers || []);
setHeaderAuthEnabled(headerAuthStatus.enabled); setHeaderAuthEnabled(headerAuthStatus.enabled);
} catch (error) { } catch (error) {
showErrorToast(error, toast); showErrorToast(error, toast);