Skip to content

Commit d6e8ddd

Browse files
committed
workaround for codefix test failure
See microsoft#13574 (comment)
1 parent dc3add2 commit d6e8ddd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/formatting/formatting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ namespace ts.formatting {
751751
let startLine = parentStartLine;
752752
let indentationOnListStartToken = parentDynamicIndentation.getIndentation();
753753

754-
if (listStartToken !== SyntaxKind.Unknown) {
754+
if (listStartToken !== SyntaxKind.Unknown && nodes.end !== undefined /* TODO: nodes.end must not be `undefined` */) {
755755
// introduce a new indentation scope for lists (including list start and end tokens)
756756
while (formattingScanner.isOnToken()) {
757757
const tokenInfo = formattingScanner.readTokenInfo(parent);

0 commit comments

Comments
 (0)