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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user