Made sure that .removeClass(null) doesn't throw an exception. Fixes #3847.
This commit is contained in:
parent
a78557472c
commit
cd28922b78
2 changed files with 7 additions and 3 deletions
|
@ -708,7 +708,7 @@ jQuery.extend({
|
|||
|
||||
// internal only, use hasClass("class")
|
||||
has: function( elem, className ) {
|
||||
return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
|
||||
return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue