From 17b2a60b4a8d4d8b29c6b52a567f596929a500d2 Mon Sep 17 00:00:00 2001 From: Dotty Date: Fri, 7 Jun 2024 13:26:57 -0400 Subject: [PATCH] fix comment PR --- src/pages/auth/signup/components/usePasswordStrength.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/auth/signup/components/usePasswordStrength.tsx b/src/pages/auth/signup/components/usePasswordStrength.tsx index 76628d154..e3f59b0dd 100644 --- a/src/pages/auth/signup/components/usePasswordStrength.tsx +++ b/src/pages/auth/signup/components/usePasswordStrength.tsx @@ -35,9 +35,9 @@ const usePasswordStrength = (props: UsePasswordStrengthProps): UsePasswordStreng useEffect(() => { const hasCorrectLength = password.length >= 8; - const hasUppercase = (password.match(/[A-Z]/g) || []).length > 0; - const hasLowercase = (password.match(/[a-z]/g) || []).length > 0; - const hasNumber = (password.match(/[0-9]/g) || []).length > 0; + const hasUppercase = (password.match(/[A-Z]/g) ?? []).length > 0; + const hasLowercase = (password.match(/[a-z]/g) ?? []).length > 0; + const hasNumber = (password.match(/[0-9]/g) ?? []).length > 0; const _validation = [hasUppercase, hasLowercase, hasNumber, hasCorrectLength];