We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ada25a7 commit d28d0d1Copy full SHA for d28d0d1
src/services/formatting/formatting.ts
@@ -716,7 +716,7 @@ namespace ts.formatting {
716
let startLine = parentStartLine;
717
let indentationOnListStartToken = parentDynamicIndentation.getIndentation();
718
719
- if (listStartToken !== SyntaxKind.Unknown) {
+ if (listStartToken !== SyntaxKind.Unknown && nodes.end !== undefined /* TODO: nodes.end must not be `undefined` */) {
720
// introduce a new indentation scope for lists (including list start and end tokens)
721
while (formattingScanner.isOnToken()) {
722
const tokenInfo = formattingScanner.readTokenInfo(parent);
0 commit comments