Match-id-7554e20c0f59389a4740e62cb8b1be2a00ad3543
This commit is contained in:
parent
b6d3a8f5fe
commit
696d2de905
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue