chore: remove unnecessary loop

This commit is contained in:
Evan You 2020-06-30 11:43:15 -04:00
parent b3536d87a5
commit d2bf3cc4a8

View File

@ -130,9 +130,7 @@ export const updateSlots = (
if (__DEV__ && isHmrUpdating) { if (__DEV__ && isHmrUpdating) {
// Parent was HMR updated so slot content may have changed. // Parent was HMR updated so slot content may have changed.
// force update slots and mark instance for hmr as well // force update slots and mark instance for hmr as well
for (const key in children as RawSlots) { extend(slots, children as Slots)
if (key !== '_') slots[key] = (children as Slots)[key]
}
} else if ( } else if (
// bail on dynamic slots (v-if, v-for, reference of scope variables) // bail on dynamic slots (v-if, v-for, reference of scope variables)
!(vnode.patchFlag & PatchFlags.DYNAMIC_SLOTS) !(vnode.patchFlag & PatchFlags.DYNAMIC_SLOTS)