api: Fixed fictionalDate being set to Jan 1 1970 instead of null in Story and Chapter.
This commit is contained in:
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user