Fix refactoring mistake

This commit is contained in:
Andrew Branch
2022-03-28 11:10:47 -07:00
parent 79b600aaa3
commit 19ef6b67c5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -445,7 +445,7 @@ namespace ts.formatting {
undefined;
if (tokenInfo) {
const parent = findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode) || previousParent!;
const parent = findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)?.parent || previousParent!;
processPair(
tokenInfo,
sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line,
@@ -1,4 +1,4 @@
/// <reference path="../fourslash.ts"/>
/// <reference path="fourslash.ts"/>
//// if (foo) {
//// if (bar) {/**/}