Skip to content

Commit 5ce3baf

Browse files
Merge pull request microsoft#992 from Microsoft/perfWork
use .pop() on an array instead of setting the length directly. The latt...
2 parents 32b8a0e + 782239b commit 5ce3baf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/services/syntax/scanner.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,13 +1628,12 @@ module TypeScript.Scanner {
16281628
var diagnostic = _tokenDiagnostics[tokenDiagnosticsLength - 1];
16291629
if (diagnostic.start() >= position) {
16301630
tokenDiagnosticsLength--;
1631+
_tokenDiagnostics.pop();
16311632
}
16321633
else {
16331634
break;
16341635
}
16351636
}
1636-
1637-
_tokenDiagnostics.length = tokenDiagnosticsLength;
16381637
}
16391638

16401639
function resetToPosition(absolutePosition: number): void {

0 commit comments

Comments
 (0)