Fix crash when the element instance type was undefined

This commit is contained in:
Ryan Cavanaugh
2015-07-20 18:16:03 -07:00
parent 649e40b171
commit ddd78fb609
4 changed files with 94 additions and 1 deletions
+1 -1
View File
@@ -7261,7 +7261,7 @@ namespace ts {
if (links.jsxFlags & JsxFlags.ClassElement) {
let elemInstanceType = getJsxElementInstanceType(node);
if (isTypeAny(elemInstanceType)) {
if (!elemInstanceType || isTypeAny(elemInstanceType)) {
return links.resolvedJsxType = anyType;
}