We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d952cc commit 3357ff4Copy full SHA for 3357ff4
packages/runtime-core/src/helpers/createSlots.ts
@@ -8,7 +8,10 @@ interface CompiledSlotDescriptor {
8
9
export function createSlots(
10
slots: Record<string, Slot>,
11
- dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[])[]
+ dynamicSlots: (
12
+ | CompiledSlotDescriptor
13
+ | CompiledSlotDescriptor[]
14
+ | undefined)[]
15
): Record<string, Slot> {
16
for (let i = 0; i < dynamicSlots.length; i++) {
17
const slot = dynamicSlots[i]
@@ -17,7 +20,7 @@ export function createSlots(
20
for (let j = 0; j < slot.length; j++) {
18
21
slots[slot[j].name] = slot[j].fn
19
22
}
- } else {
23
+ } else if (slot) {
24
// conditional single slot generated by <template v-if="..." #foo>
25
slots[slot.name] = slot.fn
26
0 commit comments