1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

Properly converted date strings during imports and provided default values (#15398)

This commit is contained in:
SmithThe4th
2025-06-30 13:04:01 -04:00
committed by GitHub
parent 62981a1bec
commit ea5224da25
2 changed files with 5 additions and 5 deletions

View File

@@ -124,9 +124,9 @@ export class CipherExport {
domain.passwordHistory = req.passwordHistory.map((ph) => PasswordHistoryExport.toDomain(ph)); domain.passwordHistory = req.passwordHistory.map((ph) => PasswordHistoryExport.toDomain(ph));
} }
domain.creationDate = req.creationDate; domain.creationDate = req.creationDate ? new Date(req.creationDate) : null;
domain.revisionDate = req.revisionDate; domain.revisionDate = req.revisionDate ? new Date(req.revisionDate) : null;
domain.deletedDate = req.deletedDate; domain.deletedDate = req.deletedDate ? new Date(req.deletedDate) : null;
return domain; return domain;
} }

View File

@@ -353,14 +353,14 @@ export class Cipher extends Domain implements Decryptable<CipherView> {
type: this.type, type: this.type,
favorite: this.favorite ?? false, favorite: this.favorite ?? false,
organizationUseTotp: this.organizationUseTotp ?? false, organizationUseTotp: this.organizationUseTotp ?? false,
edit: this.edit, edit: this.edit ?? true,
permissions: this.permissions permissions: this.permissions
? { ? {
delete: this.permissions.delete, delete: this.permissions.delete,
restore: this.permissions.restore, restore: this.permissions.restore,
} }
: undefined, : undefined,
viewPassword: this.viewPassword, viewPassword: this.viewPassword ?? true,
localData: this.localData localData: this.localData
? { ? {
lastUsedDate: this.localData.lastUsedDate lastUsedDate: this.localData.lastUsedDate