Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/services/textChanges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ namespace ts.textChanges {
// order changes by start position
const normalized = stableSort(changesInFile, (a, b) => a.range.pos - b.range.pos);
// verify that change intervals do not overlap, except possibly at end points.
for (let i = 0; i < normalized.length - 2; i++) {
for (let i = 0; i < normalized.length - 1; i++) {
Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", () =>
`${JSON.stringify(normalized[i].range)} and ${JSON.stringify(normalized[i + 1].range)}`);
}
Expand Down