diff --git a/browser/src/canvas/sections/CommentSection.ts b/browser/src/canvas/sections/CommentSection.ts index 1d180b1d3b9e0..543fc082d9eaa 100644 --- a/browser/src/canvas/sections/CommentSection.ts +++ b/browser/src/canvas/sections/CommentSection.ts @@ -436,7 +436,7 @@ export class Comment extends CanvasSectionObject { private textAreaKeyDown (ev: any): void { if (ev && ev.ctrlKey && ev.key === "Enter") { ev.preventDefault(); - this.map.mention.closeMentionPopup(false); + this.map.mention?.closeMentionPopup(false); this.onSaveComment(ev); return; }