Skip to content

Commit

Permalink
Fixed setting val by integer
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Sep 22, 2013
1 parent 7e76fc8 commit 897e0af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
8 changes: 7 additions & 1 deletion jquery.nouislider.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,14 @@
function val ( args, ignore ) {

// Setter
if( args && args.length ){
if( args !== UNDEF ){

// If the val is to be set to a number, which is valid
// when using a one-handle slider, wrap it in an array.
if(!$.isArray(args)){
args = [args];
}

// Setting is handled properly for each slider in the data set.
return this.each(function(){

Expand Down
24 changes: 12 additions & 12 deletions jquery.nouislider.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 897e0af

Please sign in to comment.