fix(login): avoid infinite loading on settings fetch failure
This commit is contained in:
parent
49df3dce90
commit
01c9410530
1 changed files with 3 additions and 0 deletions
|
|
@ -31,6 +31,9 @@ export default function LoginPage() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setHasPassword(!!data.hasPassword);
|
setHasPassword(!!data.hasPassword);
|
||||||
|
} else {
|
||||||
|
// Safe fallback on non-OK response to avoid infinite loading state.
|
||||||
|
setHasPassword(true);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
clearTimeout(timeoutId);
|
clearTimeout(timeoutId);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue