MCPcopy Create free account
hub / github.com/Nynxz/ComfyUI-IdeogramHelper / patch

Function patch

web/main.js:4625–4722  ·  view source on GitHub ↗
(n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren)

Source from the content-addressed store, hash-verified

4623 insertStaticContent: hostInsertStaticContent
4624 } = options;
4625 const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {
4626 if (n1 === n2) {
4627 return;
4628 }
4629 if (n1 && !isSameVNodeType(n1, n2)) {
4630 anchor = getNextHostNode(n1);
4631 unmount(n1, parentComponent, parentSuspense, true);
4632 n1 = null;
4633 }
4634 if (n2.patchFlag === -2) {
4635 optimized = false;
4636 n2.dynamicChildren = null;
4637 }
4638 const { type, ref: ref3, shapeFlag } = n2;
4639 switch (type) {
4640 case Text:
4641 processText(n1, n2, container, anchor);
4642 break;
4643 case Comment:
4644 processCommentNode(n1, n2, container, anchor);
4645 break;
4646 case Static:
4647 if (n1 == null) {
4648 mountStaticNode(n2, container, anchor, namespace);
4649 }
4650 break;
4651 case Fragment:
4652 processFragment(
4653 n1,
4654 n2,
4655 container,
4656 anchor,
4657 parentComponent,
4658 parentSuspense,
4659 namespace,
4660 slotScopeIds,
4661 optimized
4662 );
4663 break;
4664 default:
4665 if (shapeFlag & 1) {
4666 processElement(
4667 n1,
4668 n2,
4669 container,
4670 anchor,
4671 parentComponent,
4672 parentSuspense,
4673 namespace,
4674 slotScopeIds,
4675 optimized
4676 );
4677 } else if (shapeFlag & 6) {
4678 processComponent(
4679 n1,
4680 n2,
4681 container,
4682 anchor,

Callers 6

mountChildrenFunction · 0.85
patchBlockChildrenFunction · 0.85
componentUpdateFnFunction · 0.85
patchUnkeyedChildrenFunction · 0.85
patchKeyedChildrenFunction · 0.85
renderFunction · 0.85

Calls 10

isSameVNodeTypeFunction · 0.85
getNextHostNodeFunction · 0.85
unmountFunction · 0.85
processTextFunction · 0.85
processCommentNodeFunction · 0.85
mountStaticNodeFunction · 0.85
processFragmentFunction · 0.85
processElementFunction · 0.85
processComponentFunction · 0.85
setRefFunction · 0.85

Tested by

no test coverage detected