1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 19:53:59 +00:00

Update folder and folderview

This commit is contained in:
jaasen-livefront
2025-11-07 14:30:55 -08:00
parent 093b99e579
commit 705e2329f8
2 changed files with 8 additions and 3 deletions

View File

@@ -58,6 +58,10 @@ export class Folder extends Domain {
if (obj == null) {
return null;
}
return new Folder({ name: obj.name ?? "", revisionDate: obj.revisionDate, id: obj.id ?? "" });
return new Folder({
name: EncString.fromJSON(obj.name ?? "").encryptedString ?? "",
revisionDate: obj.revisionDate,
id: obj.id ?? "",
});
}
}

View File

@@ -10,13 +10,14 @@ export class FolderView implements View, ITreeNodeObject {
name: string = "";
revisionDate: Date;
constructor(f?: Folder | DecryptedObject<Folder, "name">) {
constructor(f?: Folder | DecryptedObject<Folder, undefined>) {
if (!f) {
this.revisionDate = new Date();
return;
}
this.id = f.id;
this.id = f.id ?? "";
this.name = f.name?.decryptedValue ?? "";
this.revisionDate = f.revisionDate;
}