mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 18:14:55 -05:00
Fix #12411, .removeClass(undefined) is a chaining no-op. Close gh-913.
.removeClass() //removes all classes, as documented .removeClass(window.nonExistentVariable) // removes nothing
This commit is contained in:
committed by
Dave Methvin
parent
23d125a51a
commit
227c49a459
@@ -78,7 +78,7 @@ jQuery.fn.extend({
|
||||
jQuery( this ).removeClass( value.call(this, j, this.className) );
|
||||
});
|
||||
}
|
||||
if ( (value && typeof value === "string") || value === undefined ) {
|
||||
if ( (value && typeof value === "string") || !arguments.length ) {
|
||||
removes = ( value || "" ).split( core_rspace );
|
||||
|
||||
for ( i = 0, l = this.length; i < l; i++ ) {
|
||||
|
||||
Reference in New Issue
Block a user