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