Skip to content

Commit

Permalink
perf(range): generates inefficient JS
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Nov 28, 2016
1 parent 6b3e2ed commit d2ebac3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/range/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,17 +579,18 @@ export class Range extends Ion implements AfterViewInit, ControlValueAccessor, O
* @private
*/
updateTicks() {
if (this._snaps && this._ticks) {
let ratio = this.ratio;
const ticks = this._ticks;
if (this._snaps && ticks) {
var ratio = this.ratio;
if (this._dual) {
let upperRatio = this.ratioUpper;
var upperRatio = this.ratioUpper;

this._ticks.forEach(t => {
ticks.forEach(t => {
t.active = (t.ratio >= ratio && t.ratio <= upperRatio);
});

} else {
this._ticks.forEach(t => {
ticks.forEach(t => {
t.active = (t.ratio <= ratio);
});
}
Expand Down

0 comments on commit d2ebac3

Please sign in to comment.