From b71da29e534f39936712d62f30e6e8229016ff8c Mon Sep 17 00:00:00 2001 From: Mark Pitsilos Date: Tue, 7 Nov 2023 16:18:43 +0200 Subject: [PATCH] fix(clerk-js): Use strict equality operator to check for lockout errors in handleRedirectCallback --- .changeset/clever-vans-flash.md | 5 +++++ packages/clerk-js/src/core/clerk.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/clever-vans-flash.md diff --git a/.changeset/clever-vans-flash.md b/.changeset/clever-vans-flash.md new file mode 100644 index 0000000000..ff936f57fe --- /dev/null +++ b/.changeset/clever-vans-flash.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Use strict equality operator to check for lockout errors in handleRedirectCallback diff --git a/packages/clerk-js/src/core/clerk.ts b/packages/clerk-js/src/core/clerk.ts index 91a46cf2da..f085cd0ba9 100644 --- a/packages/clerk-js/src/core/clerk.ts +++ b/packages/clerk-js/src/core/clerk.ts @@ -1039,8 +1039,8 @@ export default class Clerk implements ClerkInterface { } } - const userLockedFromSignUp = su.externalAccountErrorCode == 'user_locked'; - const userLockedFromSignIn = si.firstFactorVerificationErrorCode == 'user_locked'; + const userLockedFromSignUp = su.externalAccountErrorCode === 'user_locked'; + const userLockedFromSignIn = si.firstFactorVerificationErrorCode === 'user_locked'; if (userLockedFromSignUp) { return navigateToSignUp();