This commit is contained in:
Peng Lyu 2019-05-30 14:38:22 -07:00
parent df41e1b6cc
commit 5c65d9bfa4

View file

@ -98,7 +98,7 @@ export class CommentsModel {
const index = firstIndex(matchingResourceData.commentThreads, (commentThread) => commentThread.threadId === thread.threadId);
if (index >= 0) {
matchingResourceData.commentThreads[index] = ResourceWithCommentThreads.createCommentNode(URI.parse(matchingResourceData.id), thread);
} else {
} else if (thread.comments && thread.comments.length) {
matchingResourceData.commentThreads.push(ResourceWithCommentThreads.createCommentNode(URI.parse(matchingResourceData.id), thread));
}
});