From 9e10d577e2a4b9b2cbf8b3272d6e58f4627ae922 Mon Sep 17 00:00:00 2001 From: Mark Pitsilos Date: Thu, 9 Nov 2023 06:37:06 +0200 Subject: [PATCH] fix(clerk-js): Return reject(err) in factor one & two code forms (#2080) --- .changeset/flat-donuts-sleep.md | 5 +++++ .../src/ui/components/SignIn/SignInFactorOneCodeForm.tsx | 2 +- .../src/ui/components/SignIn/SignInFactorTwoCodeForm.tsx | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/flat-donuts-sleep.md diff --git a/.changeset/flat-donuts-sleep.md b/.changeset/flat-donuts-sleep.md new file mode 100644 index 0000000000..86c6185705 --- /dev/null +++ b/.changeset/flat-donuts-sleep.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Return reject(err) in factor one & two code forms diff --git a/packages/clerk-js/src/ui/components/SignIn/SignInFactorOneCodeForm.tsx b/packages/clerk-js/src/ui/components/SignIn/SignInFactorOneCodeForm.tsx index 0df94eeff5..8c31f33718 100644 --- a/packages/clerk-js/src/ui/components/SignIn/SignInFactorOneCodeForm.tsx +++ b/packages/clerk-js/src/ui/components/SignIn/SignInFactorOneCodeForm.tsx @@ -77,7 +77,7 @@ export const SignInFactorOneCodeForm = (props: SignInFactorOneCodeFormProps) => return clerk.__internal_navigateWithError('..', err.errors[0]); } - reject(err); + return reject(err); }); }; diff --git a/packages/clerk-js/src/ui/components/SignIn/SignInFactorTwoCodeForm.tsx b/packages/clerk-js/src/ui/components/SignIn/SignInFactorTwoCodeForm.tsx index bc9aa8ba95..cf1b4f308e 100644 --- a/packages/clerk-js/src/ui/components/SignIn/SignInFactorTwoCodeForm.tsx +++ b/packages/clerk-js/src/ui/components/SignIn/SignInFactorTwoCodeForm.tsx @@ -88,7 +88,7 @@ export const SignInFactorTwoCodeForm = (props: SignInFactorTwoCodeFormProps) => return clerk.__internal_navigateWithError('..', err.errors[0]); } - reject(err); + return reject(err); }); };