diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index 13c423e9813..787c6fe3f46 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -68,7 +68,9 @@ module ts.formatting { export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] { var line = sourceFile.getLineAndCharacterFromPosition(position).line; - Debug.assert(line >= 2); + if (line === 1) { + return []; + } // get the span for the previous\current line var span = { // get start position for the previous line