From d2bf3cc4a85a45ca69bcfbef0781a6b3eacb89d6 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 30 Jun 2020 11:43:15 -0400 Subject: [PATCH] chore: remove unnecessary loop --- packages/runtime-core/src/componentSlots.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/runtime-core/src/componentSlots.ts b/packages/runtime-core/src/componentSlots.ts index a940fd5f..28f6ab1e 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)