X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=613faabb9fcfdc7832c7fa661582b7794a08e7ff;hb=c9ef09c800ba7b6510d9e3a68f053ae29409f621;hp=a4a81de4474ed3b2270ef3f6a1d00f2a90dfdf57;hpb=5c2d70979c15bbda5c90e1634abe11d8c350abcb;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index a4a81de..613faab 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; } },