slotScopeIds = null,
optimized = __DEV__ && isHmrUpdating ? false : !!n2.dynamicChildren
) => {
+ if (n1 === n2) {
+ return
+ }
+
// patching & not same type, unmount old tree
if (n1 && !isSameVNodeType(n1, n2)) {
anchor = getNextHostNode(n1)
const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText(''))!
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2
- if (dynamicChildren) {
- optimized = true
+
+ if (__DEV__ && isHmrUpdating) {
+ // HMR updated, force full diff
+ patchFlag = 0
+ optimized = false
+ dynamicChildren = null
}
// check if this is a slot fragment with :slotted scope ids
: fragmentSlotScopeIds
}
- if (__DEV__ && isHmrUpdating) {
- // HMR updated, force full diff
- patchFlag = 0
- optimized = false
- dynamicChildren = null
- }
-
if (n1 == null) {
hostInsert(fragmentStartAnchor, container, anchor)
hostInsert(fragmentEndAnchor, container, anchor)