From 7e754a1e50ec950a1b4cd091ba789034d1a249a8 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 11 Oct 2024 15:55:02 +0200 Subject: [PATCH] improve handling of toString arg in schema --- frontend/src/lib/components/ArgInput.svelte | 4 +++- frontend/src/lib/components/SchemaForm.svelte | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index 7a75029eb4..80537e4d44 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -141,7 +141,9 @@ defaultValue?: any, nnullable?: boolean ) { - console.log(value) + if (label == 'toString' && typeof value == 'function') { + value = undefined + } if ((value == undefined || value == null) && !ignoreValueUndefined) { value = defaultValue if (defaultValue === undefined || defaultValue === null) { diff --git a/frontend/src/lib/components/SchemaForm.svelte b/frontend/src/lib/components/SchemaForm.svelte index 6068cda7fc..bbd226d0ae 100644 --- a/frontend/src/lib/components/SchemaForm.svelte +++ b/frontend/src/lib/components/SchemaForm.svelte @@ -120,6 +120,7 @@ schema.properties = n } let nkeys = Object.keys(schema.properties ?? {}) + if (!deepEqual(keys, nkeys)) { keys = nkeys dispatch('change')