Skip to content

Commit ceb7116

Browse files
authored
Outdated comments in a non-checked out PR cause a console error (#3293)
Fixes #3289
1 parent f4a99a4 commit ceb7116

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/view/pullRequestCommentController.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ export class PullRequestCommentController implements CommentHandler, CommentReac
164164
this._commentThreadCache[this.getCommentThreadCacheKey(fileName, isBase)] = threadsByPath[fileName]
165165
.filter(
166166
thread =>
167-
(thread.diffSide === DiffSide.LEFT && isBase) ||
168-
(thread.diffSide === DiffSide.RIGHT && !isBase),
167+
((thread.diffSide === DiffSide.LEFT && isBase) ||
168+
(thread.diffSide === DiffSide.RIGHT && !isBase))
169+
&& (thread.line !== null),
169170
)
170171
.map(thread => {
171172
const range = new vscode.Range(

0 commit comments

Comments
 (0)