]> 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>
Wed, 25 Mar 2015 19:55:19 +0000 (15:55 -0400)
jQuery now returns `null` for empty attributes instead of `undefined`.

Ref gh-1516

ui/spinner.js

index 870b2cd8935d35a7fe1fe9aaaa6fc034eef59ac2..9a08208c11d5c022877e139dd883ba5e0a393bae 100644 (file)
@@ -105,7 +105,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;
                        }
                } );