Skip to content

Commit 4aded27

Browse files
committed
move declaration into the block
1 parent b0f0dc1 commit 4aded27

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/services/formatting/formatting.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,11 @@ namespace ts.formatting {
720720
let tokenIndentation = (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) ?
721721
dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind) :
722722
Constants.Unknown;
723-
let commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation);
724723

725724
if (currentTokenInfo.leadingTrivia) {
725+
let commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation);
726726
let indentNextTokenOrTrivia = true;
727+
727728
for (let triviaItem of currentTokenInfo.leadingTrivia) {
728729
if (!rangeContainsRange(originalRange, triviaItem)) {
729730
continue;

0 commit comments

Comments
 (0)