aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
authorMatthias Jäggli <matthias.jaeggli@scout24.ch>2012-08-28 16:26:06 +0300
committerDave Methvin <dave.methvin@gmail.com>2012-10-21 21:06:41 -0400
commit227c49a4596423a125bdcb1d25a2263e526360db (patch)
tree769820170acef0b190b34e9e4979f9ae610d256c /src/attributes.js
parent23d125a51acc1cd2d127c9feb684aa96cea7d1fc (diff)
downloadjquery-227c49a4596423a125bdcb1d25a2263e526360db.tar.gz
jquery-227c49a4596423a125bdcb1d25a2263e526360db.zip
Fix #12411, .removeClass(undefined) is a chaining no-op. Close gh-913.
.removeClass() //removes all classes, as documented .removeClass(window.nonExistentVariable) // removes nothing
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js
index 68e763e09..00e21af35 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -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++ ) {