File tree 1 file changed +10
-9
lines changed
packages/runtime-core/src
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -470,6 +470,10 @@ function baseCreateRenderer(
470
470
slotScopeIds = null ,
471
471
optimized = __DEV__ && isHmrUpdating ? false : ! ! n2 . dynamicChildren
472
472
) => {
473
+ if ( n1 === n2 ) {
474
+ return
475
+ }
476
+
473
477
// patching & not same type, unmount old tree
474
478
if ( n1 && ! isSameVNodeType ( n1 , n2 ) ) {
475
479
anchor = getNextHostNode ( n1 )
@@ -1152,8 +1156,12 @@ function baseCreateRenderer(
1152
1156
const fragmentEndAnchor = ( n2 . anchor = n1 ? n1 . anchor : hostCreateText ( '' ) ) !
1153
1157
1154
1158
let { patchFlag, dynamicChildren, slotScopeIds : fragmentSlotScopeIds } = n2
1155
- if ( dynamicChildren ) {
1156
- optimized = true
1159
+
1160
+ if ( __DEV__ && isHmrUpdating ) {
1161
+ // HMR updated, force full diff
1162
+ patchFlag = 0
1163
+ optimized = false
1164
+ dynamicChildren = null
1157
1165
}
1158
1166
1159
1167
// check if this is a slot fragment with :slotted scope ids
@@ -1163,13 +1171,6 @@ function baseCreateRenderer(
1163
1171
: fragmentSlotScopeIds
1164
1172
}
1165
1173
1166
- if ( __DEV__ && isHmrUpdating ) {
1167
- // HMR updated, force full diff
1168
- patchFlag = 0
1169
- optimized = false
1170
- dynamicChildren = null
1171
- }
1172
-
1173
1174
if ( n1 == null ) {
1174
1175
hostInsert ( fragmentStartAnchor , container , anchor )
1175
1176
hostInsert ( fragmentEndAnchor , container , anchor )
You can’t perform that action at this time.
0 commit comments