Skip to content

Commit d36175b

Browse files
author
Andy Hanson
committed
Remove some redundant code in createJsxAttributesTypeFromAttributesProperty
1 parent 4303a29 commit d36175b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13293,19 +13293,15 @@ namespace ts {
1329313293
if (spread !== emptyObjectType) {
1329413294
if (attributesArray.length > 0) {
1329513295
spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
13296-
attributesArray = [];
13297-
attributesTable = createMap<Symbol>();
1329813296
}
1329913297
attributesArray = getPropertiesOfType(spread);
1330013298
}
1330113299

1330213300
attributesTable = createMap<Symbol>();
13303-
if (attributesArray) {
13304-
forEach(attributesArray, (attr) => {
13305-
if (!filter || filter(attr)) {
13306-
attributesTable.set(attr.name, attr);
13307-
}
13308-
});
13301+
for (const attr of attributesArray) {
13302+
if (!filter || filter(attr)) {
13303+
attributesTable.set(attr.name, attr);
13304+
}
1330913305
}
1331013306
}
1331113307

0 commit comments

Comments
 (0)