1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-27 23:03:45 +00:00

add optional chaining to username comparison of existing login ciphers

This commit is contained in:
Jonathan Prusik
2026-01-22 15:47:34 -05:00
parent a46a33f9f7
commit 85b5c6fbcf

View File

@@ -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 =