Skip to content

Commit cf81938

Browse files
author
Yui T
committed
Merge branch 'master' into fixTypeGuardWithInstanceOf
2 parents fdadd3c + 0518124 commit cf81938

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/services/formatting/formatting.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ module ts.formatting {
6868

6969
export function formatOnEnter(position: number, sourceFile: SourceFile, rulesProvider: RulesProvider, options: FormatCodeOptions): TextChange[] {
7070
var line = sourceFile.getLineAndCharacterFromPosition(position).line;
71-
Debug.assert(line >= 2);
71+
if (line === 1) {
72+
return [];
73+
}
7274
// get the span for the previous\current line
7375
var span = {
7476
// get start position for the previous line

0 commit comments

Comments
 (0)