Filter FAR results to initial SourceFile

This commit is contained in:
Andrew Casey 2018-02-20 14:35:01 -08:00
parent fee1df34ce
commit cc386d25a4

View File

@ -119,7 +119,7 @@ namespace ts.OrganizeImports {
const entries = FindAllReferences.getReferenceEntriesForNode(identifier.pos, identifier, program, [sourceFile], {
isCancellationRequested: () => false,
throwIfCancellationRequested: () => { /*noop*/ },
});
}).filter(e => e.type === "node" && e.node.getSourceFile() === sourceFile);
return entries.length > 1;
}
}