Skip to content

Commit

Permalink
Extend cleansing of slider.options.pipStep in pips() to correct negat…
Browse files Browse the repository at this point in the history
…ive and zero values
  • Loading branch information
hughbris committed Feb 25, 2016
1 parent 873399e commit b8a0820
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/jquery-ui-slider-pips.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
}


// we don't want the step ever to be a floating point.
slider.options.pipStep = Math.round( options.step );
// we don't want the step ever to be a floating point or negative (or 0 actually, so we'll set it to 1 in that case).
slider.options.pipStep = Math.abs(Math.round( options.step )) || 1;

// get rid of all pips that might already exist.
slider.element
Expand Down

0 comments on commit b8a0820

Please sign in to comment.