Skip to content

Commit

Permalink
fix(runtime-core): should also inherit the DOM el of the text nodes (v…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhonghe committed Oct 12, 2022
1 parent 35dc2bb commit bce1a4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/runtime-core/src/renderer.ts
Expand Up @@ -2391,6 +2391,11 @@ export function traverseStaticChildren(n1: VNode, n2: VNode, shallow = false) {
if (__DEV__ && c2.type === Comment && !c2.el) {
c2.el = c1.el
}
// #6852
// also inherit for text nodes
if (c2.type === Text && !c2.el) {
c2.el = c1.el
}
}
}
}
Expand Down

0 comments on commit bce1a4a

Please sign in to comment.