1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

PM-17187 Autofill new card information in the popout (#13688)

This commit is contained in:
Jeffrey Holland
2025-03-20 20:54:33 +01:00
committed by GitHub
parent 85c71351fc
commit 79fd1b3263
4 changed files with 64 additions and 1 deletions

View File

@@ -440,6 +440,32 @@ const mapAddEditCipherInfoToInitialValues = (
initialValues.name = cipher.name;
}
if (cipher.type === CipherType.Card) {
const card = cipher.card;
if (card != null) {
if (card.cardholderName != null) {
initialValues.cardholderName = card.cardholderName;
}
if (card.number != null) {
initialValues.number = card.number;
}
if (card.expMonth != null) {
initialValues.expMonth = card.expMonth;
}
if (card.expYear != null) {
initialValues.expYear = card.expYear;
}
if (card.code != null) {
initialValues.code = card.code;
}
}
}
if (cipher.type === CipherType.Login) {
const login = cipher.login;