From 8e7db51cff5ea6f604f52d22db4e0ea0f514b95c Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Fri, 7 Jul 2023 15:19:54 +0200 Subject: [PATCH] fix(frontend): isValid when no properties (#1806) --- frontend/src/lib/components/ScheduleEditor.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/lib/components/ScheduleEditor.svelte b/frontend/src/lib/components/ScheduleEditor.svelte index 87be9fe68e..f8ec1810b7 100644 --- a/frontend/src/lib/components/ScheduleEditor.svelte +++ b/frontend/src/lib/components/ScheduleEditor.svelte @@ -69,6 +69,12 @@ $: script_path != '' && loadScript(script_path) + // set isValid to true when a script/flow without any properties is selected + $: runnable?.schema && + runnable.schema.properties && + Object.keys(runnable.schema.properties).length === 0 && + (isValid = true) + const dispatch = createEventDispatcher() async function loadScript(p: string | undefined): Promise {