Skip to content

Commit

Permalink
Address PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Yui T authored and mhegazy committed May 12, 2017
1 parent dbae5d2 commit 6976dda
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13468,17 +13468,17 @@ namespace ts {
}

function getApparentTypeOfJsxPropsType(propsType: Type): Type {
if (propsType) {
if (propsType.flags & TypeFlags.Intersection) {
const propsApprentType: Type[] = [];
for (const t of (<UnionOrIntersectionType>propsType).types) {
propsApprentType.push(getApparentType(t));
}
return getIntersectionType(propsApprentType);
if (!propsType) {
return undefined;
}
if (propsType.flags & TypeFlags.Intersection) {
const propsApparentType: Type[] = [];
for (const t of (<UnionOrIntersectionType>propsType).types) {
propsApparentType.push(getApparentType(t));
}
return getApparentType(propsType);
return getIntersectionType(propsApparentType);
}
return propsType;
return getApparentType(propsType);
}

/**
Expand Down

0 comments on commit 6976dda

Please sign in to comment.