mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Added defaults to DTO
This commit is contained in:
parent
ded18049b0
commit
000e1e5048
1 changed files with 3 additions and 3 deletions
|
@ -13,12 +13,12 @@ export class SnippetDTO {
|
||||||
this.name = data.name;
|
this.name = data.name;
|
||||||
|
|
||||||
if (options.formats === 'lexical') {
|
if (options.formats === 'lexical') {
|
||||||
this.lexical = data.lexical;
|
this.lexical = data.lexical || null;
|
||||||
} else {
|
} else {
|
||||||
this.mobiledoc = data.mobiledoc;
|
this.mobiledoc = data.mobiledoc || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.created_at = data.createdAt;
|
this.created_at = data.createdAt;
|
||||||
this.updated_at = data.updatedAt;
|
this.updated_at = data.updatedAt || null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue