Tweaked a couple cases where == was used instead of ===.
[jquery.git] / src / manipulation.js
index baab8c6..4f7ee65 100644 (file)
@@ -1,7 +1,7 @@
 var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
        rleadingWhitespace = /^\s+/,
        rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
-       rselfClosing = /^(?:abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i,
+       rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
        rtagName = /<([\w:]+)/,
        rtbody = /<tbody/i,
        rhtml = /<|&\w+;/,
@@ -32,11 +32,11 @@ if ( !jQuery.support.htmlSerialize ) {
 
 jQuery.fn.extend({
        text: function( text ) {
-         if(jQuery.isFunction(text)) {
-           return this.each(function() {
-             return jQuery(this).text( text.call(this) );
-           });
-         }
+               if(jQuery.isFunction(text)) {
+                       return this.each(function() {
+                               return jQuery(this).text( text.call(this) );
+                       });
+               }
 
                if ( typeof text !== "object" && text !== undefined ) {
                        return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
@@ -279,7 +279,7 @@ function cloneCopyEvent(orig, ret) {
        var i = 0;
 
        ret.each(function(){
-               if ( this.nodeName !== orig[i].nodeName ) {
+               if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
                        return;
                }
 
@@ -416,7 +416,7 @@ jQuery.extend({
                                                        div.firstChild && div.firstChild.childNodes :
 
                                                        // String was a bare <thead> or <tfoot>
-                                                       wrap[1] == "<table>" && !hasBody ?
+                                                       wrap[1] === "<table>" && !hasBody ?
                                                                div.childNodes :
                                                                [];