mirror of
https://github.com/jquery/jquery.git
synced 2026-01-25 11:07:58 -05:00
bug 6158; fixing replaceWith from throwing errors on empty elements
This commit is contained in:
@@ -261,6 +261,9 @@ jQuery.fn.extend({
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if ( !this.length ) {
|
||||
return this;
|
||||
}
|
||||
return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value );
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user