We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a3f57a commit effcf2aCopy full SHA for effcf2a
src/services/textChanges.ts
@@ -634,7 +634,7 @@ namespace ts.textChanges {
634
// order changes by start position
635
const normalized = stableSort(changesInFile, (a, b) => a.range.pos - b.range.pos);
636
// verify that change intervals do not overlap, except possibly at end points.
637
- for (let i = 0; i < normalized.length - 2; i++) {
+ for (let i = 0; i < normalized.length - 1; i++) {
638
Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", () =>
639
`${JSON.stringify(normalized[i].range)} and ${JSON.stringify(normalized[i + 1].range)}`);
640
}
0 commit comments