api: Fixed fictionalDate being set to Jan 1 1970 instead of null in Story and Chapter.

This commit is contained in:
2018-09-17 20:18:59 +02:00
parent bdf7d766f3
commit ed5e3fa8ea
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ class Chapter {
this.author = author
this.source = source
this.createdDate = new Date(createdDate)
this.fictionalDate = new Date(fictionalDate)
this.fictionalDate = fictionalDate != null ? new Date(fictionalDate) : null
this.editedDate = new Date(editedDate)
}
+1 -1
View File
@@ -23,7 +23,7 @@ class Story {
this.category = category
this.createdDate = new Date(createdDate)
this.updatedDate = new Date(updatedDate)
this.fictionalDate = new Date(fictionalDate)
this.fictionalDate = fictionalDate != null ? new Date(fictionalDate) : null
this.tags = tags.map(dt => new Tag(dt.kind, dt.name))
this.chapters = chapters != null ? chapters.map(c => new Chapter(c.id, c.title, c.author, c.source, c.createdDate, c.fictionalDate, c.editedDate)) : null
}