Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2484,10 +2484,14 @@ export function traverseStaticChildren(
if (c2.type === Text) {
c2.el = c1.el
}
// also inherit for comment nodes, but not placeholders (e.g. v-if which
// would have received .el during block patch)
if (__DEV__ && c2.type === Comment && !c2.el) {
c2.el = c1.el
if (__DEV__) {
// #2324 also inherit for comment nodes, but not placeholders (e.g. v-if which
// would have received .el during block patch)
if (c2.type === Comment && !c2.el) {
c2.el = c1.el
}

c2.el && (c2.el.__vnode = c2)
}
}
}
Expand Down