daiwei 1 год назад
Родитель
Сommit
71284faa96

+ 1 - 1
packages/runtime-core/src/component.ts

@@ -582,7 +582,7 @@ export interface ComponentInternalInstance {
    * For updating css vars on contained teleports
    * @internal
    */
-  ut?: (target: RendererElement, vars?: Record<string, string>) => void
+  ut?: (target: RendererElement | null, vars?: Record<string, string>) => void
 
   /**
    * dev only. For style v-bind hydration mismatch checks

+ 1 - 1
packages/runtime-core/src/components/Teleport.ts

@@ -480,7 +480,7 @@ function updateCssVars(vnode: VNode, isDisabled: boolean) {
       if (node.nodeType === 1) node.setAttribute('data-v-owner', ctx.uid)
       node = node.nextSibling
     }
-    ctx.ut(node.target)
+    ctx.ut(vnode.target)
   }
 }