mirror of https://github.com/vuejs/core.git
fix(runtime-core): update __vnode of static nodes when patching along the optimized path (#13223)
* fix(runtime-core): update __vnode of static nodes when patching along the optimized path * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
e4d9e7ee52
commit
b3ecee3da8
|
@ -2484,11 +2484,15 @@ export function traverseStaticChildren(
|
||||||
if (c2.type === Text) {
|
if (c2.type === Text) {
|
||||||
c2.el = c1.el
|
c2.el = c1.el
|
||||||
}
|
}
|
||||||
// also inherit for comment nodes, but not placeholders (e.g. v-if which
|
if (__DEV__) {
|
||||||
|
// #2324 also inherit for comment nodes, but not placeholders (e.g. v-if which
|
||||||
// would have received .el during block patch)
|
// would have received .el during block patch)
|
||||||
if (__DEV__ && c2.type === Comment && !c2.el) {
|
if (c2.type === Comment && !c2.el) {
|
||||||
c2.el = c1.el
|
c2.el = c1.el
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c2.el && (c2.el.__vnode = c2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue