Skip to content

Commit cc386d2

Browse files
committed
Filter FAR results to initial SourceFile
1 parent fee1df3 commit cc386d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/organizeImports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ namespace ts.OrganizeImports {
119119
const entries = FindAllReferences.getReferenceEntriesForNode(identifier.pos, identifier, program, [sourceFile], {
120120
isCancellationRequested: () => false,
121121
throwIfCancellationRequested: () => { /*noop*/ },
122-
});
122+
}).filter(e => e.type === "node" && e.node.getSourceFile() === sourceFile);
123123
return entries.length > 1;
124124
}
125125
}

0 commit comments

Comments
 (0)