Permalink
Browse files

bug 6158; fixing replaceWith from throwing errors on empty elements

  • Loading branch information...
jboesch committed Mar 5, 2011
1 parent 2d0bc7c commit 5c2d70979c15bbda5c90e1634abe11d8c350abcb
Showing with 3 additions and 0 deletions.
  1. +3 −0 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 );
}
},

0 comments on commit 5c2d709

Please sign in to comment.