Skip to content

Commit

Permalink
fix(cssVars): cssVars work with Teleport
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Sep 16, 2021
1 parent d80d40a commit 76e719b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime-dom/src/helpers/useCssVars.ts
Expand Up @@ -53,7 +53,7 @@ function setVarsOnVNode(vnode: VNode, vars: Record<string, string>) {

if (vnode.shapeFlag & ShapeFlags.ELEMENT && vnode.el) {
setVarsOnNode(vnode.el as Node, vars)
} else if (vnode.type === Fragment) {
} else if (vnode.type === Fragment || vnode.shapeFlag & ShapeFlags.TELEPORT) {
;(vnode.children as VNode[]).forEach(c => setVarsOnVNode(c, vars))
} else if (vnode.type === Static) {
let { el, anchor } = vnode
Expand Down

0 comments on commit 76e719b

Please sign in to comment.