import dom from '../vdom/dom';
import realNode from '../util/real-node';

export default function (src, dst) {
  const realNodeSrc = realNode(src);
  realNodeSrc.parentNode.replaceChild(dom(dst), realNodeSrc);
}

import dom from '../vdom/dom';
import realNode from '../util/real-node';

export default function (src, dst) {
  const realNodeSrc = realNode(src);
  realNodeSrc.parentNode && realNodeSrc.parentNode.replaceChild(dom(dst), realNodeSrc);
}

Fix issue where a parent was null, possibly from a node that was already patched.
Fix issue where a parent was null, possibly from a node that was already patched.
