Merge pull request #15609 from Microsoft/jsx-redundant-code

Remove some redundant code in createJsxAttributesTypeFromAttributesProperty
This commit is contained in:
Andy
2017-05-08 15:36:47 -07:00
committed by GitHub

View File

@@ -13301,19 +13301,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);
}
}
}