We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70e606d commit ccc965cCopy full SHA for ccc965c
src/vs/workbench/contrib/comments/common/commentModel.ts
@@ -119,7 +119,10 @@ export class CommentsModel {
119
changed.forEach(thread => {
120
// Find resource that has the comment thread
121
const matchingResourceIndex = threadsForOwner.findIndex((resourceData) => resourceData.id === thread.resource);
122
- const matchingResourceData = threadsForOwner[matchingResourceIndex];
+ const matchingResourceData = matchingResourceIndex >= 0 ? threadsForOwner[matchingResourceIndex] : undefined;
123
+ if (!matchingResourceData) {
124
+ return;
125
+ }
126
127
// Find comment node on resource that is that thread and replace it
128
const index = matchingResourceData.commentThreads.findIndex((commentThread) => commentThread.threadId === thread.threadId);
0 commit comments