fix typos, fixes #3075

This commit is contained in:
Eric Vergnaud 2021-02-13 02:30:50 +08:00
parent 25196001d7
commit e99363ac1a
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ class IntervalSet {
reduce(k) {
// only need to reduce if k is not the last
if (k < this.intervalslength - 1) {
if (k < this.intervals.length - 1) {
const l = this.intervals[k];
const r = this.intervals[k + 1];
// if r contained in l
@ -103,7 +103,7 @@ class IntervalSet {
this.reduce(k);
} else if (l.stop >= r.start) {
this.intervals[k] = new Interval(l.start, r.stop);
this.intervals = this.intervals.splice(k + 1, 1);
this.intervals.splice(k + 1, 1);
}
}
}