Skip to content

Commit f5cf5f0

Browse files
committed
Prevent duplicate Uris in the index
1 parent 5631f6a commit f5cf5f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/documentIndex.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ export async function updateIndexForDocument(
258258
// This file contains an InterSystems document, so add it to the index
259259
if (!documentName || (documentName && documentName != file.name)) {
260260
const documentUris = documents.get(file.name) ?? [];
261+
if (documentUris.some((u) => u.toString() == uriString)) return result;
261262
documentUris.push(uri);
262263
documents.set(file.name, documentUris);
263264
uris.set(uriString, file.name);

0 commit comments

Comments
 (0)