From b0da0741f61e4b2d5a679d4946b74d6722e9ce21 Mon Sep 17 00:00:00 2001 From: Valdo Ghafoor Date: Mon, 16 Jan 2023 16:21:12 +0100 Subject: [PATCH] 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 --- src/components/FlowForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FlowForm.vue b/src/components/FlowForm.vue index 81a6bcbf..0cc7f374 100644 --- a/src/components/FlowForm.vue +++ b/src/components/FlowForm.vue @@ -307,7 +307,7 @@ descriptionLink: LinkOption } - const defaultSlot = this.$slots.default() + const defaultSlot = this.$slots.default && this.$slots.default() let children = null if (defaultSlot && defaultSlot.length) {