From: Evan You Date: Tue, 30 Jun 2020 15:43:15 +0000 (-0400) Subject: chore: remove unnecessary loop X-Git-Tag: v3.0.0-beta.17~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2bf3cc4a85a45ca69bcfbef0781a6b3eacb89d6;p=thirdparty%2Fvuejs%2Fcore.git chore: remove unnecessary loop --- diff --git a/packages/runtime-core/src/componentSlots.ts b/packages/runtime-core/src/componentSlots.ts index a940fd5f7b..28f6ab1ef4 100644 --- a/packages/runtime-core/src/componentSlots.ts +++ b/packages/runtime-core/src/componentSlots.ts @@ -130,9 +130,7 @@ export const updateSlots = ( if (__DEV__ && isHmrUpdating) { // Parent was HMR updated so slot content may have changed. // force update slots and mark instance for hmr as well - for (const key in children as RawSlots) { - if (key !== '_') slots[key] = (children as Slots)[key] - } + extend(slots, children as Slots) } else if ( // bail on dynamic slots (v-if, v-for, reference of scope variables) !(vnode.patchFlag & PatchFlags.DYNAMIC_SLOTS)