(cherry picked from commit
3030a9e)
nextNext = next ? next.next() : null;
toDetach.detach({normalizeStrategy: (next && next.sameNode(params.to.node)) ? 'merge' : 'detach-right'});
if(next && !next.isInDocument()) {
nextNext = next ? next.next() : null;
toDetach.detach({normalizeStrategy: (next && next.sameNode(params.to.node)) ? 'merge' : 'detach-right'});
if(next && !next.isInDocument()) {
+ if(next.sameNode(params.to.node)) {
+ return;
+ }