Bug Tracker

Changeset 2436

Show
Ignore:
Timestamp:
07/21/07 01:55:05 (1 year ago)
Author:
brandon.aaron
Message:

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/jquery/jquery.js

    r2432 r2436  
    13661366        // internal only, use addClass("class") 
    13671367        add: function( elem, c ){ 
    1368             jQuery.each( c.split(/\s+/), function(i, cur){ 
     1368            jQuery.each( (c || "").split(/\s+/), function(i, cur){ 
    13691369                if ( !jQuery.className.has( elem.className, cur ) ) 
    13701370                    elem.className += ( elem.className ? " " : "" ) + cur;