diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cc716922be1..f08f2d996af 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -13467,7 +13467,7 @@ namespace ts { function getContextualTypeForJsxExpression(node: JsxExpression): Type { // JSX expression can appear in two position : JSX Element's children or JSX attribute - const jsxAttributes: JsxAttributes = isJsxAttributeLike(node.parent) ? + const jsxAttributes = isJsxAttributeLike(node.parent) ? node.parent.parent : isJsxElement(node.parent) ? node.parent.openingElement.attributes :