From e5685daa52aeaef735c5ddd4827d7ceca76d96da Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 11 Feb 2023 20:54:28 +0200 Subject: [PATCH] useTuitioClient fix --- src/hooks.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } };