diff --git a/src/hooks.ts b/src/hooks.ts index ffbe3f3..ffcd574 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -27,9 +27,7 @@ const useTuitioClient = (options: TuitioClientHookOptions) => { } return response; } catch (error) { - if (onLoginError) { - onLoginError(error); - } + onLoginError && onLoginError(error); throw error; } };