Parcourir la source

110234 add finally

soumaeda il y a 2 ans
Parent
commit
456a933396
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      apps/app/src/components/LoginForm.tsx

+ 6 - 0
apps/app/src/components/LoginForm.tsx

@@ -116,6 +116,9 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
       setLoginErrors(errs);
       setIsLoading(false);
     }
+    finally {
+      setIsLoading(false);
+    }
     return;
 
   }, [passwordForLogin, resetLoginErrors, router, usernameForLogin]);
@@ -329,6 +332,9 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
       }
       setIsLoading(false);
     }
+    finally {
+      setIsLoading(false);
+    }
     return;
   }, [usernameForRegister, nameForRegister, emailForRegister, passwordForRegister, resetRegisterErrors, router, isEmailAuthenticationEnabled]);