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

Merge pull request #114 from Hinton/hotifx/hidden-password

Ensure viewPassword has a default value
This commit is contained in:
Chad Scharf
2020-06-12 09:50:00 -04:00
committed by GitHub

View File

@@ -56,7 +56,11 @@ export class Cipher extends Domain {
this.favorite = obj.favorite; this.favorite = obj.favorite;
this.organizationUseTotp = obj.organizationUseTotp; this.organizationUseTotp = obj.organizationUseTotp;
this.edit = obj.edit; this.edit = obj.edit;
if (obj.viewPassword != null) {
this.viewPassword = obj.viewPassword; this.viewPassword = obj.viewPassword;
} else {
this.viewPassword = true; // Default for already synced Ciphers without viewPassword
}
this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null; this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;
this.collectionIds = obj.collectionIds; this.collectionIds = obj.collectionIds;
this.localData = localData; this.localData = localData;