Match-id-7554e20c0f59389a4740e62cb8b1be2a00ad3543

This commit is contained in:
* 2022-01-25 15:06:21 +08:00 committed by *
parent b6d3a8f5fe
commit 696d2de905
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ function getChildNS(parentNS: string | null, tagName: string): string {
}
// 获取容器
export function getNSCtx(dom: Container, parentNS: string, type: string): string {
export function getNSCtx(dom?: Container, parentNS: string, type: string): string {
return dom ? getChildNS(dom.namespaceURI ?? null, dom.nodeName) : getChildNS(parentNS, type);
}

View File

@ -31,7 +31,7 @@ let ctxOldPreviousContext: Object = {};
// capture阶段设置
function setNamespaceCtx(vNode: VNode, dom?: Container) {
const nextContext = getNSCtx(dom, ctxNamespace, vNode.type);
const nextContext = getNSCtx(ctxNamespace, vNode.type, dom);
vNode.setContext(CTX_NAMESPACE, ctxNamespace);
ctxNamespace = nextContext;