From 377fae6a7facacd16e32f17632d464eed039757e Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 25 Sep 2023 11:52:47 +0200 Subject: [PATCH] next/previous commenting range command doesn't work (#193958) Fixes #193728 --- src/vs/workbench/contrib/comments/browser/commentsController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentsController.ts b/src/vs/workbench/contrib/comments/browser/commentsController.ts index c7fb47476c8..f05d745a668 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsController.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsController.ts @@ -344,7 +344,7 @@ class CommentingRangeDecorator { return range; } - return decorations[0].getActiveRange() ?? undefined; + return (decorations.length > 0 ? (decorations[0].getActiveRange() ?? undefined) : undefined); } public dispose(): void {