Skip to content

Commit 51bad3e

Browse files
authored
Fix commenting ranges and opening comments (microsoft#209866)
1 parent 794b0c2 commit 51bad3e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/vs/workbench/contrib/comments/browser/commentReply.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export class CommentReply<T extends IRange | ICellRange> extends Disposable {
177177
public focusIfNeeded() {
178178
if (!this._commentThread.comments || !this._commentThread.comments.length) {
179179
this.commentEditor.focus();
180-
} else if (this.commentEditor.getModel()!.getValueLength() > 0) {
180+
} else if ((this.commentEditor.getModel()?.getValueLength() ?? 0) > 0) {
181181
this.expandReplyArea();
182182
}
183183
}
@@ -195,10 +195,6 @@ export class CommentReply<T extends IRange | ICellRange> extends Disposable {
195195
return this.commentEditor.hasWidgetFocus();
196196
}
197197

198-
public getCommentModel() {
199-
return this.commentEditor.getModel()!;
200-
}
201-
202198
public updateCanReply() {
203199
if (!this._commentThread.canReply) {
204200
this.form.style.display = 'none';

0 commit comments

Comments
 (0)