@sigx/terminal 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2664,14 +2664,14 @@ function createRenderer(options) {
2664
2664
  } else if (isSameVNode(oldStartVNode, newEndVNode)) {
2665
2665
  patch(oldStartVNode, newEndVNode, parent);
2666
2666
  const nodeToMove = oldStartVNode.dom;
2667
- const anchor = hostNextSibling(oldEndVNode.dom);
2667
+ const anchor = oldEndVNode.dom ? hostNextSibling(oldEndVNode.dom) : null;
2668
2668
  if (nodeToMove) hostInsert(nodeToMove, parent, anchor);
2669
2669
  oldStartVNode = oldChildren[++oldStartIdx];
2670
2670
  newEndVNode = newChildren[--newEndIdx];
2671
2671
  } else if (isSameVNode(oldEndVNode, newStartVNode)) {
2672
2672
  patch(oldEndVNode, newStartVNode, parent);
2673
2673
  const nodeToMove = oldEndVNode.dom;
2674
- const anchor = oldStartVNode.dom;
2674
+ const anchor = oldStartVNode.dom ?? null;
2675
2675
  if (nodeToMove) hostInsert(nodeToMove, parent, anchor);
2676
2676
  oldEndVNode = oldChildren[--oldEndIdx];
2677
2677
  newStartVNode = newChildren[++newStartIdx];
@@ -2683,12 +2683,12 @@ function createRenderer(options) {
2683
2683
  patch(vnodeToMove, newStartVNode, parent);
2684
2684
  oldChildren[idxInOld] = void 0;
2685
2685
  if (vnodeToMove.dom && oldStartVNode.dom) hostInsert(vnodeToMove.dom, parent, oldStartVNode.dom);
2686
- } else mount(newStartVNode, parent, oldStartVNode.dom, parentIsSVG);
2686
+ } else mount(newStartVNode, parent, oldStartVNode.dom ?? null, parentIsSVG);
2687
2687
  newStartVNode = newChildren[++newStartIdx];
2688
2688
  }
2689
2689
  if (oldStartIdx > oldEndIdx) {
2690
2690
  if (newStartIdx <= newEndIdx) {
2691
- const anchor = newChildren[newEndIdx + 1] == null ? null : newChildren[newEndIdx + 1].dom;
2691
+ const anchor = newChildren[newEndIdx + 1] == null ? null : newChildren[newEndIdx + 1].dom ?? null;
2692
2692
  for (let i = newStartIdx; i <= newEndIdx; i++) mount(newChildren[i], parent, anchor, parentIsSVG);
2693
2693
  }
2694
2694
  } else if (newStartIdx > newEndIdx) {