X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=27f81cc2450109187ae3094e7f7bd9475bed3796;hb=124acbfbc523614dc5835cfce2c82b867a59986f;hp=a4a81de4474ed3b2270ef3f6a1d00f2a90dfdf57;hpb=5c2d70979c15bbda5c90e1634abe11d8c350abcb;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index a4a81de..27f81cc 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -261,10 +261,9 @@ jQuery.fn.extend({ } }); } else { - if ( !this.length ) { - return this; - } - return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ); + return this.length ? + this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : + this; } },