From: Scott González Date: Mon, 23 Mar 2015 22:39:04 +0000 (-0400) Subject: Spinner: Properly handle empty attributes in create with jQuery git X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f6379dc65548e9770b53f29bfa901576a38064ec;p=jquery-ui.git Spinner: Properly handle empty attributes in create with jQuery git jQuery now returns `null` for empty attributes instead of `undefined`. Ref gh-1516 (cherry picked from commit e109e768190089744804d084e9a26f010dd63a37) --- diff --git a/ui/spinner.js b/ui/spinner.js index ccbce7c96..068c129ed 100644 --- a/ui/spinner.js +++ b/ui/spinner.js @@ -92,7 +92,7 @@ return $.widget( "ui.spinner", { $.each( [ "min", "max", "step" ], function( i, option ) { var value = element.attr( option ); - if ( value !== undefined && value.length ) { + if ( value != null && value.length ) { options[ option ] = value; } });