Skip to content

Commit

Permalink
Fix refactoring mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Mar 28, 2022
1 parent 79b600a commit 19ef6b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/formatting/formatting.ts
Expand Up @@ -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,
Expand Down
@@ -1,4 +1,4 @@
/// <reference path="../fourslash.ts"/>
/// <reference path="fourslash.ts"/>

//// if (foo) {
//// if (bar) {/**/}
Expand Down

0 comments on commit 19ef6b6

Please sign in to comment.