From 1b4662bc51d7ec7e89a6e1a228e5ac140e253c20 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Wed, 11 Dec 2024 11:22:47 +0100 Subject: [PATCH] a11y view is blank after running `focus comment on line` (#235807) Fixes #229857 --- .../contrib/comments/browser/commentThreadZoneWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts index 6790337c79a..eb2a0396eee 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts @@ -188,7 +188,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget public reveal(commentUniqueId?: number, focus: CommentWidgetFocus = CommentWidgetFocus.None) { this.makeVisible(commentUniqueId, focus); - const comment = this._commentThread.comments?.find(comment => comment.uniqueIdInThread === commentUniqueId); + const comment = this._commentThread.comments?.find(comment => comment.uniqueIdInThread === commentUniqueId) ?? this._commentThread.comments?.[0]; this.commentService.setActiveCommentAndThread(this.uniqueOwner, { thread: this._commentThread, comment }); }