From b0bea9416aacf127c0e169fcc5c19a2352a485d9 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 16 Apr 2023 00:44:34 +0200 Subject: [PATCH] fix refreshFlow loop --- .../inlineScriptsPanel/InlineScriptEditorPanel.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte index 21dbb400b4..268a8da43a 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte @@ -69,9 +69,9 @@ async function refreshFlow(x: RunnableByPath) { if (componentInput?.type == 'runnable') { const schema = (await loadSchema($workspaceStore ?? '', x.path, 'flow')) ?? emptySchema() - x.schema = schema - const nfields = computeFields(schema, false, componentInput.fields) - if (!deepEqual(componentInput.fields, nfields)) { + if (!deepEqual(x.schema, schema)) { + x.schema = schema + const nfields = computeFields(schema, false, componentInput.fields) componentInput.fields = nfields componentInput = componentInput }