Skip to content

Commit 0bd5a6f

Browse files
committed
fixed an issue where a duplicate 'never reached' insight would appear'
1 parent 796d35b commit 0bd5a6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/analyticsCodeLens.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,11 @@ class CodelensProvider implements vscode.CodeLensProvider<vscode.CodeLens>
239239
const lenses = await this.getLensForCodeLocationObject(methodInfo,
240240
uniqueEndpoints,documentInfo.usageData.getAll(),documentInfo.insights.all.filter(x=>x.scope=="EntrySpan"|| x.scope=="Span"),
241241
);
242+
243+
const uniqueLenses =[...new Map(lenses.map(item =>
244+
[item.command!.title, item])).values()];
242245

243-
for (const lens of lenses){
246+
for (const lens of uniqueLenses){
244247
codelens.push(lens);
245248
}
246249

0 commit comments

Comments
 (0)