From 85b5c6fbcf3eb4945fd5f79a84da97635c6494b7 Mon Sep 17 00:00:00 2001 From: Jonathan Prusik Date: Thu, 22 Jan 2026 15:47:34 -0500 Subject: [PATCH] add optional chaining to username comparison of existing login ciphers --- apps/browser/src/autofill/background/notification.background.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/browser/src/autofill/background/notification.background.ts b/apps/browser/src/autofill/background/notification.background.ts index 92c3fec7d94..6c8a768a0d8 100644 --- a/apps/browser/src/autofill/background/notification.background.ts +++ b/apps/browser/src/autofill/background/notification.background.ts @@ -724,7 +724,7 @@ export default class NotificationBackground { const ciphersByInputMatchCategory = ciphersForURL.reduce( (acc, { id, login }) => { const usernameInputMatchesCipher = - usernameFieldHasValue && login.username.toLowerCase() === normalizedUsername; + usernameFieldHasValue && login.username?.toLowerCase() === normalizedUsername; const passwordInputMatchesCipher = currentPasswordFieldHasValue && login.password === currentPasswordFieldValue; const newPasswordInputMatchesCipher =