Skip to content

Commit 6976dda

Browse files
Yui Tmhegazy
Yui T
authored andcommitted
Address PR
1 parent dbae5d2 commit 6976dda

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
@@ -13468,17 +13468,17 @@ namespace ts {
1346813468
}
1346913469

1347013470
function getApparentTypeOfJsxPropsType(propsType: Type): Type {
13471-
if (propsType) {
13472-
if (propsType.flags & TypeFlags.Intersection) {
13473-
const propsApprentType: Type[] = [];
13474-
for (const t of (<UnionOrIntersectionType>propsType).types) {
13475-
propsApprentType.push(getApparentType(t));
13476-
}
13477-
return getIntersectionType(propsApprentType);
13471+
if (!propsType) {
13472+
return undefined;
13473+
}
13474+
if (propsType.flags & TypeFlags.Intersection) {
13475+
const propsApparentType: Type[] = [];
13476+
for (const t of (<UnionOrIntersectionType>propsType).types) {
13477+
propsApparentType.push(getApparentType(t));
1347813478
}
13479-
return getApparentType(propsType);
13479+
return getIntersectionType(propsApparentType);
1348013480
}
13481-
return propsType;
13481+
return getApparentType(propsType);
1348213482
}
1348313483

1348413484
/**

0 commit comments

Comments
 (0)