testrunner: adding tests for $.fn.hasClass.
[jquery.git] / src / core.js
index 1d27616..32e850f 100644 (file)
@@ -350,7 +350,7 @@ jQuery.fn = jQuery.prototype = {
        },
 
        hasClass: function( selector ) {
-               return this.is( "." + selector );
+               return !!selector && this.is( "." + selector );
        },
 
        val: function( value ) {