Skip to content

Commit d2bf3cc

Browse files
committed
chore: remove unnecessary loop
1 parent b3536d8 commit d2bf3cc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/runtime-core/src/componentSlots.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ export const updateSlots = (
130130
if (__DEV__ && isHmrUpdating) {
131131
// Parent was HMR updated so slot content may have changed.
132132
// force update slots and mark instance for hmr as well
133-
for (const key in children as RawSlots) {
134-
if (key !== '_') slots[key] = (children as Slots)[key]
135-
}
133+
extend(slots, children as Slots)
136134
} else if (
137135
// bail on dynamic slots (v-if, v-for, reference of scope variables)
138136
!(vnode.patchFlag & PatchFlags.DYNAMIC_SLOTS)

0 commit comments

Comments
 (0)