parent
5d952cc051
commit
3357ff438c
@ -8,7 +8,10 @@ interface CompiledSlotDescriptor {
|
||||
|
||||
export function createSlots(
|
||||
slots: Record<string, Slot>,
|
||||
dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[])[]
|
||||
dynamicSlots: (
|
||||
| CompiledSlotDescriptor
|
||||
| CompiledSlotDescriptor[]
|
||||
| undefined)[]
|
||||
): Record<string, Slot> {
|
||||
for (let i = 0; i < dynamicSlots.length; i++) {
|
||||
const slot = dynamicSlots[i]
|
||||
@ -17,7 +20,7 @@ export function createSlots(
|
||||
for (let j = 0; j < slot.length; j++) {
|
||||
slots[slot[j].name] = slot[j].fn
|
||||
}
|
||||
} else {
|
||||
} else if (slot) {
|
||||
// conditional single slot generated by <template v-if="..." #foo>
|
||||
slots[slot.name] = slot.fn
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user