More PR feedback

This commit is contained in:
Jake Bailey
2022-01-19 13:14:45 -08:00
parent 9570a59da4
commit e9a2355e80
+2 -2
View File
@@ -1344,8 +1344,8 @@ namespace ts {
const child = children[i];
if (isWhiteSpaceOnlyJsxText(child)) {
if (parentKind === SyntaxKind.JsxText || parentKind === SyntaxKind.JsxSelfClosingElement) {
Debug.assert(i > 0, "`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");
if (i === 0 && (parentKind === SyntaxKind.JsxText || parentKind === SyntaxKind.JsxSelfClosingElement)) {
Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");
}
}
else if (nodeHasTokens(children[i], sourceFile)) {