Skip to content

Commit 8907c70

Browse files
author
Yui T
committed
Address PR
1 parent 8d09085 commit 8907c70

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/compiler/checker.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13549,17 +13549,17 @@ namespace ts {
1354913549
}
1355013550

1355113551
function getApparentTypeOfJsxPropsType(propsType: Type): Type {
13552-
if (propsType) {
13553-
if (propsType.flags & TypeFlags.Intersection) {
13554-
const propsApprentType: Type[] = [];
13555-
for (const t of (<UnionOrIntersectionType>propsType).types) {
13556-
propsApprentType.push(getApparentType(t));
13557-
}
13558-
return getIntersectionType(propsApprentType);
13552+
if (!propsType) {
13553+
return undefined;
13554+
}
13555+
if (propsType.flags & TypeFlags.Intersection) {
13556+
const propsApparentType: Type[] = [];
13557+
for (const t of (<UnionOrIntersectionType>propsType).types) {
13558+
propsApparentType.push(getApparentType(t));
1355913559
}
13560-
return getApparentType(propsType);
13560+
return getIntersectionType(propsApparentType);
1356113561
}
13562-
return propsType;
13562+
return getApparentType(propsType);
1356313563
}
1356413564

1356513565
/**

0 commit comments

Comments
 (0)