summaryrefslogtreecommitdiffstats
path: root/browser/src/layer/tile/CommentListSection.ts
diff options
context:
space:
mode:
Diffstat (limited to 'browser/src/layer/tile/CommentListSection.ts')
-rw-r--r--browser/src/layer/tile/CommentListSection.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/browser/src/layer/tile/CommentListSection.ts b/browser/src/layer/tile/CommentListSection.ts
index a16c03df91..36efc66cad 100644
--- a/browser/src/layer/tile/CommentListSection.ts
+++ b/browser/src/layer/tile/CommentListSection.ts
@@ -923,7 +923,8 @@ class CommentSection {
this.showHideComment(annotation);
}
else {
- this.containerObject.addSection(annotation);
+ if (!this.containerObject.addSection(annotation))
+ return;
this.sectionProperties.commentList.push(annotation);
}
@@ -1699,7 +1700,8 @@ class CommentSection {
comment.avatar = this.map._viewInfoByUserName[comment.author].userextrainfo.avatar;
}
var commentSection = new app.definitions.Comment(comment, {}, this);
- this.containerObject.addSection(commentSection);
+ if (!this.containerObject.addSection(commentSection))
+ continue;
this.sectionProperties.commentList.push(commentSection);
this.idIndexMap.set(commentSection.sectionProperties.data.id, i);
this.updateResolvedState(this.sectionProperties.commentList[i]);