]> source.dussan.org Git - jquery-ui.git/commitdiff
Spinner: Properly handle empty attributes in create with jQuery git
authorScott González <scott.gonzalez@gmail.com>
Mon, 23 Mar 2015 22:39:04 +0000 (18:39 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 9 Jun 2016 17:17:14 +0000 (13:17 -0400)
jQuery now returns `null` for empty attributes instead of `undefined`.

Ref gh-1516

(cherry picked from commit e109e768190089744804d084e9a26f010dd63a37)

ui/spinner.js

index ccbce7c96fba41f5cbe08395bc8b77756cf9bba7..068c129ed32cf1e83653c6d07edf91da93f19b17 100644 (file)
@@ -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;
                        }
                });