From 29b867093c25b8128865e959c6c8af7311226239 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 02:34:33 +0530 Subject: [PATCH] fix: resolve 4 bugs in AccountSafe --- frontend/src/pages/ForgotPasswordPage.tsx | 2 +- frontend/src/pages/RegisterPage.tsx | 2 +- frontend/src/services/securityService.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/ForgotPasswordPage.tsx b/frontend/src/pages/ForgotPasswordPage.tsx index 0b38b87..1c7894b 100644 --- a/frontend/src/pages/ForgotPasswordPage.tsx +++ b/frontend/src/pages/ForgotPasswordPage.tsx @@ -164,7 +164,7 @@ const ForgotPasswordPage: React.FC = () => { if (window.turnstile) { renderWidget(); - return undefined; + return; } else { const interval = setInterval(() => { if (window.turnstile) { diff --git a/frontend/src/pages/RegisterPage.tsx b/frontend/src/pages/RegisterPage.tsx index 36c4427..f24c205 100644 --- a/frontend/src/pages/RegisterPage.tsx +++ b/frontend/src/pages/RegisterPage.tsx @@ -227,7 +227,7 @@ const RegisterPage: React.FC = () => {

); } - if (isUsernameAvailable === true) return

Username is available

; + if (isUsernameAvailable) return

Username is available

; if (isUsernameAvailable === false) return

Username is already taken

; return null; }; diff --git a/frontend/src/services/securityService.ts b/frontend/src/services/securityService.ts index 3cd05a8..936d00d 100644 --- a/frontend/src/services/securityService.ts +++ b/frontend/src/services/securityService.ts @@ -161,7 +161,7 @@ export const checkPasswordBreach = async ( if (hashSuffix.trim() === suffix) { return { isBreached: true, - breachCount: parseInt(count.trim(), 10) + breachCount: parseInt(count.trim(, 10), 10) }; } }