Skip to content

Commit 7c1a484

Browse files
committed
fix(slots): filter out compiler marker from resolved slots
fix vuejs#1470
1 parent 0017caf commit 7c1a484

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/runtime-core/src/componentSlots.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ export const initSlots = (
104104
if ((children as RawSlots)._ === 1) {
105105
const slots: InternalSlots = (instance.slots = {})
106106
for (const key in children as RawSlots) {
107-
if (key !== '_') slots[key] = (children as Slots)[key]
107+
Object.defineProperty(slots, key, {
108+
configurable: true,
109+
value: (children as Slots)[key],
110+
enumerable: key !== '_',
111+
writable: true
112+
})
108113
}
109114
} else {
110115
normalizeObjectSlots(children as RawSlots, (instance.slots = {}))

0 commit comments

Comments
 (0)