Skip to content

Commit dd40ad8

Browse files
committed
fix(runtime-core): should still do full traverse of stable fragment children in dev + hmr
1 parent bebd44f commit dd40ad8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/runtime-core/src/renderer.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -1155,11 +1155,13 @@ function baseCreateRenderer(
11551155
parentSuspense,
11561156
isSVG
11571157
)
1158-
// #2080 if the stable fragment has a key, it's a <template v-for> that may
1159-
// get moved around. Make sure all root level vnodes inherit el.
1160-
// #2134 or if it's a component root, it may also get moved around
1161-
// as the component is being moved.
1162-
if (
1158+
if (__DEV__ && parentComponent && parentComponent.type.__hmrId) {
1159+
traverseStaticChildren(n1, n2)
1160+
} else if (
1161+
// #2080 if the stable fragment has a key, it's a <template v-for> that may
1162+
// get moved around. Make sure all root level vnodes inherit el.
1163+
// #2134 or if it's a component root, it may also get moved around
1164+
// as the component is being moved.
11631165
n2.key != null ||
11641166
(parentComponent && n2 === parentComponent.subTree)
11651167
) {

0 commit comments

Comments
 (0)