Commit 480aae72 authored by Brandon Aaron's avatar Brandon Aaron

addClass doesn't fail when passed an undefined or null variable (#1309)

parent b965c98f
......@@ -1365,7 +1365,7 @@ jQuery.extend({
className: {
// internal only, use addClass("class")
add: function( elem, c ){
jQuery.each( c.split(/\s+/), function(i, cur){
jQuery.each( (c || "").split(/\s+/), function(i, cur){
if ( !jQuery.className.has( elem.className, cur ) )
elem.className += ( elem.className ? " " : "" ) + cur;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment