diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index e96608bbf71..fb18792d05b 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -646,7 +646,7 @@ module ts.formatting { } } } - if (isTokenInRange) { + if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { insertIndentation(currentTokenInfo.token.pos, indentation.getEffectiveIndentation(tokenStart.line, currentTokenInfo.token.kind), lineAdded); } }