organizeImports: Fix bug in reference-testing for renamed import (#22797)

This commit is contained in:
Andy
2018-03-22 13:08:58 -07:00
committed by GitHub
parent 54274a8a2a
commit e0ca8a5f39
3 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ namespace ts.OrganizeImports {
}
else {
// List of named imports
const newElements = namedBindings.elements.filter(e => isDeclarationUsed(e.propertyName || e.name));
const newElements = namedBindings.elements.filter(e => isDeclarationUsed(e.name));
if (newElements.length < namedBindings.elements.length) {
namedBindings = newElements.length
? updateNamedImports(namedBindings, newElements)