1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-23 16:13:21 +00:00

migrate remaining exports

This commit is contained in:
jaasen-livefront
2025-11-03 18:10:52 -08:00
parent ddb89e35e0
commit 8dfee0595d
9 changed files with 99 additions and 117 deletions

View File

@@ -1,5 +1,3 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../key-management/crypto/models/enc-string";
import { Folder as FolderDomain } from "../../vault/models/domain/folder";
import { FolderView } from "../../vault/models/view/folder.view";
@@ -19,14 +17,14 @@ export class FolderExport {
}
static toDomain(req: FolderExport, domain = new FolderDomain()) {
domain.name = req.name != null ? new EncString(req.name) : null;
domain.name = new EncString(req.name ?? "");
return domain;
}
name: string;
name: string = "";
// Use build method instead of ctor so that we can control order of JSON stringify for pretty print
build(o: FolderView | FolderDomain) {
this.name = safeGetString(o.name);
this.name = safeGetString(o.name ?? "") ?? "";
}
}