From 3ed3e50486bb9a028635ea396b70d372f02418a6 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Thu, 17 Jan 2019 21:06:43 +0100 Subject: [PATCH] api: Fixed fatal error if Comment.character is null. --- rpdata/api/Comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpdata/api/Comment.js b/rpdata/api/Comment.js index b14a334..af20b18 100644 --- a/rpdata/api/Comment.js +++ b/rpdata/api/Comment.js @@ -17,7 +17,7 @@ class Comment { this.subject = subject this.author = author this.characterName = characterName - this.character = CommentCharacter.fromData(character) + this.character = character != null ? CommentCharacter.fromData(character) : null this.fictionalDate = new Date(fictionalDate) this.createdDate = new Date(createdDate) this.editedDate = new Date(editedDate)