diff --git a/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte b/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte index a9f9286ef2..1e52ea33a1 100644 --- a/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte +++ b/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte @@ -12,6 +12,10 @@ // Ensure any nullish modelId values get set to empty string so // that the select works $: if (value?.modelId == null) value = { modelId: "" } + + function schemaHasOptions(schema) { + return !!schema.constraints?.inclusion?.length + }
@@ -27,18 +31,15 @@
{#each schemaFields as [field, schema]}
- {#if schema.constraints?.inclusion?.length} + {#if schemaHasOptions(schema)}
{field}
- {#each schema.constraints.inclusion as option} {/each} - {:else if schema.type === "string" || schema.type === "number"} + {:else if schema.type === 'string' || schema.type === 'number'}