mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 02:15:10 -05:00
Don't parse out a name for JSX fragments (#52818)
This commit is contained in:
@@ -6151,10 +6151,7 @@ namespace Parser {
|
||||
function parseJsxClosingFragment(inExpressionContext: boolean): JsxClosingFragment {
|
||||
const pos = getNodePos();
|
||||
parseExpected(SyntaxKind.LessThanSlashToken);
|
||||
if (tokenIsIdentifierOrKeyword(token())) {
|
||||
parseErrorAtRange(parseJsxElementName(), Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment);
|
||||
}
|
||||
if (parseExpected(SyntaxKind.GreaterThanToken, /*diagnostic*/ undefined, /*shouldAdvance*/ false)) {
|
||||
if (parseExpected(SyntaxKind.GreaterThanToken, Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment, /*shouldAdvance*/ false)) {
|
||||
// manually advance the scanner in order to look for jsx text inside jsx
|
||||
if (inExpressionContext) {
|
||||
nextToken();
|
||||
|
||||
Reference in New Issue
Block a user