diff --git a/frontend/src/models/task.ts b/frontend/src/models/task.ts index 0f6e65b89..0464103d9 100644 --- a/frontend/src/models/task.ts +++ b/frontend/src/models/task.ts @@ -151,8 +151,10 @@ export default class TaskModel extends AbstractModel implements ITask { this.updated = new Date(this.updated) this.projectId = Number(this.projectId) - - this.comments = this.comments.map(c => new TaskCommentModel(c)) + + // If we would use the camel cased value here, it would lose the reactions - emojis can't be camel cased. + // The comments will be camel cased anyway in the constructor of the task comment model. + this.comments = (data.comments || []).map(c => new TaskCommentModel(c)) // We can't convert emojis to camel case, hence we do this manually this.reactions = {}