Remove some redundant code in createJsxAttributesTypeFromAttributesProperty

This commit is contained in:
Andy Hanson 2017-05-05 08:51:18 -07:00
parent 4303a294f9
commit d36175b1e8

View file

@ -13293,19 +13293,15 @@ namespace ts {
if (spread !== emptyObjectType) {
if (attributesArray.length > 0) {
spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
attributesArray = [];
attributesTable = createMap<Symbol>();
}
attributesArray = getPropertiesOfType(spread);
}
attributesTable = createMap<Symbol>();
if (attributesArray) {
forEach(attributesArray, (attr) => {
if (!filter || filter(attr)) {
attributesTable.set(attr.name, attr);
}
});
for (const attr of attributesArray) {
if (!filter || filter(attr)) {
attributesTable.set(attr.name, attr);
}
}
}