Skip to content

Commit 12f6e52

Browse files
Remove unnecessary allocation
1 parent 1603563 commit 12f6e52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ namespace ts {
16731673
}
16741674

16751675
function getDocumentHighlights(fileName: string, position: number, filesToSearch: ReadonlyArray<string>): DocumentHighlights[] {
1676-
Debug.assert(contains(map(filesToSearch, normalizePath), fileName));
1676+
Debug.assert(filesToSearch.some(f => normalizePath(f) === fileName));
16771677
synchronizeHostData();
16781678
const sourceFilesToSearch = map(filesToSearch, f => Debug.assertDefined(program.getSourceFile(f)));
16791679
const sourceFile = getValidSourceFile(fileName);

0 commit comments

Comments
 (0)