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 e109e76819)
This commit is contained in:
Scott González 2015-03-23 18:39:04 -04:00
parent 6d9194ac11
commit f6379dc655

View File

@ -92,7 +92,7 @@ return $.widget( "ui.spinner", {
$.each( [ "min", "max", "step" ], function( i, option ) { $.each( [ "min", "max", "step" ], function( i, option ) {
var value = element.attr( option ); var value = element.attr( option );
if ( value !== undefined && value.length ) { if ( value != null && value.length ) {
options[ option ] = value; options[ option ] = value;
} }
}); });