Fixed some bugs relating to the setter arg change in val and html. Also optimized...
[jquery.git] / src / manipulation.js
index 730dfca..081bb54 100644 (file)
@@ -173,7 +173,7 @@ jQuery.fn.extend({
 
        html: function( value ) {
                if ( value === undefined ) {
-                       return this[0] ?
+                       return this[0] && this[0].nodeType === 1 ?
                                this[0].innerHTML.replace(rinlinejQuery, "") :
                                null;