mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-06 00:48:08 +02:00
Ensure viewPassword has a default value
This commit is contained in:
parent
dd147ce338
commit
81c76816b9
@ -56,7 +56,11 @@ export class Cipher extends Domain {
|
||||
this.favorite = obj.favorite;
|
||||
this.organizationUseTotp = obj.organizationUseTotp;
|
||||
this.edit = obj.edit;
|
||||
this.viewPassword = obj.viewPassword;
|
||||
if (obj.viewPassword != null) {
|
||||
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.collectionIds = obj.collectionIds;
|
||||
this.localData = localData;
|
||||
|
Loading…
Reference in New Issue
Block a user