0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Added defaults to DTO

This commit is contained in:
Fabien "egg" O'Carroll 2023-11-29 13:38:33 +00:00
parent ded18049b0
commit 000e1e5048

View file

@ -13,12 +13,12 @@ export class SnippetDTO {
this.name = data.name;
if (options.formats === 'lexical') {
this.lexical = data.lexical;
this.lexical = data.lexical || null;
} else {
this.mobiledoc = data.mobiledoc;
this.mobiledoc = data.mobiledoc || null;
}
this.created_at = data.createdAt;
this.updated_at = data.updatedAt;
this.updated_at = data.updatedAt || null;
}
}