Skip to content

Commit 239f444

Browse files
Merge pull request #274 from digma-ai/fix/equal-code-object-ids
Handle the case when there are multiple methods with the same ID in the document
2 parents 162ec40 + b153792 commit 239f444

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/views/codeAnalytics/insightsViewTab.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ export class InsightsViewTab implements ICodeAnalyticsViewTab {
102102
}
103103

104104
const methodInfo = docInfo.methods.single(
105-
(x) => x.id == codeObject.id
105+
(x) =>
106+
x.id == codeObject.id &&
107+
// Check display name for cases when there are multiple
108+
// methods with the same id in the document
109+
x.displayName === codeObject.displayName
106110
);
107111
const codeObjectsIds = methodInfo.getIds(true, true);
108112

0 commit comments

Comments
 (0)