Skip to content

Commit d2ebac3

Browse files
committed
perf(range): generates inefficient JS
1 parent 6b3e2ed commit d2ebac3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/components/range/range.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,17 +579,18 @@ export class Range extends Ion implements AfterViewInit, ControlValueAccessor, O
579579
* @private
580580
*/
581581
updateTicks() {
582-
if (this._snaps && this._ticks) {
583-
let ratio = this.ratio;
582+
const ticks = this._ticks;
583+
if (this._snaps && ticks) {
584+
var ratio = this.ratio;
584585
if (this._dual) {
585-
let upperRatio = this.ratioUpper;
586+
var upperRatio = this.ratioUpper;
586587

587-
this._ticks.forEach(t => {
588+
ticks.forEach(t => {
588589
t.active = (t.ratio >= ratio && t.ratio <= upperRatio);
589590
});
590591

591592
} else {
592-
this._ticks.forEach(t => {
593+
ticks.forEach(t => {
593594
t.active = (t.ratio <= ratio);
594595
});
595596
}

0 commit comments

Comments
 (0)