Skip to content

Commit de62cc0

Browse files
authoredJul 28, 2020
fix(hmr): should update el for HYDRATE_EVENTS patchFlags node (#1707)
fix vitejs/vite#613
1 parent 421a70d commit de62cc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/runtime-core/src/renderer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2105,7 +2105,7 @@ function baseCreateRenderer(
21052105
const c1 = ch1[i] as VNode
21062106
const c2 = (ch2[i] = cloneIfMounted(ch2[i] as VNode))
21072107
if (c2.shapeFlag & ShapeFlags.ELEMENT && !c2.dynamicChildren) {
2108-
if (c2.patchFlag <= 0) {
2108+
if (c2.patchFlag <= 0 || c2.patchFlag === PatchFlags.HYDRATE_EVENTS) {
21092109
c2.el = c1.el
21102110
}
21112111
traverseStaticChildren(c1, c2)

0 commit comments

Comments
 (0)
Please sign in to comment.