useTuitioClient fix

master
Tudor Stanciu 2023-02-11 20:54:28 +02:00
parent 3f35229fef
commit e5685daa52
1 changed files with 4 additions and 2 deletions

View File

@ -27,8 +27,10 @@ const useTuitioClient = (options: TuitioClientHookOptions) => {
}
return response;
} catch (error) {
if (onLoginError) onLoginError(error);
else throw error;
if (onLoginError) {
onLoginError(error);
}
throw error;
}
};