Skip to content

Commit b0da074

Browse files
author
Valdo Ghafoor
authored
Fix "$slots.default is not a function"
Hi, I'm using your package with Vue 3 and when I invoke flow-form component, I have this error. Apparently if there is no slots, $slots.default is undefined
1 parent 6c43b68 commit b0da074

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/FlowForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
descriptionLink: LinkOption
308308
}
309309
310-
const defaultSlot = this.$slots.default()
310+
const defaultSlot = this.$slots.default && this.$slots.default()
311311
let children = null
312312
313313
if (defaultSlot && defaultSlot.length) {

0 commit comments

Comments
 (0)