Browse Source

api: Fixed fatal error if Comment.character is null.

master
Gisle Aune 6 years ago
parent
commit
3ed3e50486
  1. 2
      rpdata/api/Comment.js

2
rpdata/api/Comment.js

@ -17,7 +17,7 @@ class Comment {
this.subject = subject this.subject = subject
this.author = author this.author = author
this.characterName = characterName this.characterName = characterName
this.character = CommentCharacter.fromData(character)
this.character = character != null ? CommentCharacter.fromData(character) : null
this.fictionalDate = new Date(fictionalDate) this.fictionalDate = new Date(fictionalDate)
this.createdDate = new Date(createdDate) this.createdDate = new Date(createdDate)
this.editedDate = new Date(editedDate) this.editedDate = new Date(editedDate)

Loading…
Cancel
Save