diff --git a/src/hooks.ts b/src/hooks.ts index 4a1b42b..ffbe3f3 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -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; } };