From e99363ac1a0880ac94bdf9643087d959d9d37d21 Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Sat, 13 Feb 2021 02:30:50 +0800 Subject: [PATCH] fix typos, fixes #3075 --- runtime/JavaScript/src/antlr4/IntervalSet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/JavaScript/src/antlr4/IntervalSet.js b/runtime/JavaScript/src/antlr4/IntervalSet.js index c802bc82f..d1119b309 100644 --- a/runtime/JavaScript/src/antlr4/IntervalSet.js +++ b/runtime/JavaScript/src/antlr4/IntervalSet.js @@ -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); } } }