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