Skip to content

Commit

Permalink
fix(slots): filter out compiler marker from resolved slots
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Jun 30, 2020
1 parent 0017caf commit 7c1a484
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/runtime-core/src/componentSlots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ export const initSlots = (
if ((children as RawSlots)._ === 1) {
const slots: InternalSlots = (instance.slots = {})
for (const key in children as RawSlots) {
if (key !== '_') slots[key] = (children as Slots)[key]
Object.defineProperty(slots, key, {
configurable: true,
value: (children as Slots)[key],
enumerable: key !== '_',
writable: true
})
}
} else {
normalizeObjectSlots(children as RawSlots, (instance.slots = {}))
Expand Down

0 comments on commit 7c1a484

Please sign in to comment.