Skip to content

Commit

Permalink
More PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Jan 19, 2022
1 parent 9570a59 commit e9a2355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit e9a2355

Please sign in to comment.