Add missing JSXSpreadAttribute case to JSX completion logic (#44514)

This commit is contained in:
Wesley Wigham
2021-06-10 10:01:25 -07:00
committed by GitHub
parent 481c2037cc
commit 130e16d73b
2 changed files with 22 additions and 0 deletions

View File

@@ -1245,6 +1245,7 @@ namespace ts.Completions {
break;
case SyntaxKind.JsxExpression:
case SyntaxKind.JsxSpreadAttribute:
// For `<div foo={true} [||] ></div>`, `parent` will be `{true}` and `previousToken` will be `}`
if (previousToken.kind === SyntaxKind.CloseBraceToken && currentToken.kind === SyntaxKind.GreaterThanToken) {
isJsxIdentifierExpected = true;