From 6976dda2a3424d168d5a87e35ddba6235f302049 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 12 May 2017 11:54:23 -0700 Subject: [PATCH] Address PR --- src/compiler/checker.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 43574b02f3e02..86d81df431659 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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 (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 (propsType).types) { + propsApparentType.push(getApparentType(t)); } - return getApparentType(propsType); + return getIntersectionType(propsApparentType); } - return propsType; + return getApparentType(propsType); } /**