From d9c98af6f7924e4a435be62e1620bb1fb5e2c874 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Jul 2023 15:40:18 +0200 Subject: [PATCH] fix compile --- .../contextPanel/ComponentOutputViewer.svelte | 19 +++++++++++-------- .../editor/contextPanel/SubGridOutput.svelte | 19 +++++++++++++------ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/frontend/src/lib/components/apps/editor/contextPanel/ComponentOutputViewer.svelte b/frontend/src/lib/components/apps/editor/contextPanel/ComponentOutputViewer.svelte index cfa0d87040..f708bdf274 100644 --- a/frontend/src/lib/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +++ b/frontend/src/lib/components/apps/editor/contextPanel/ComponentOutputViewer.svelte @@ -17,15 +17,18 @@ if (observableOutputs) { Object.entries(observableOutputs).forEach(([k, output]) => { object[k] = undefined - output?.subscribe({ - id: 'alloutputs' + componentId + '-' + k, - next: (value) => { - if (!hasContent) { - hasContent = true + output?.subscribe( + { + id: 'alloutputs' + componentId + '-' + k, + next: (value) => { + if (!hasContent) { + hasContent = true + } + object[k] = value } - object[k] = value - } - }) + }, + object[k] + ) }) } } diff --git a/frontend/src/lib/components/apps/editor/contextPanel/SubGridOutput.svelte b/frontend/src/lib/components/apps/editor/contextPanel/SubGridOutput.svelte index f65d290c5c..11f52e288f 100644 --- a/frontend/src/lib/components/apps/editor/contextPanel/SubGridOutput.svelte +++ b/frontend/src/lib/components/apps/editor/contextPanel/SubGridOutput.svelte @@ -26,12 +26,19 @@ })) $: if (outputs?.selectedTabIndex) { - outputs.selectedTabIndex.subscribe({ - id: 'subgridoutput-' + parentId, - next: (value) => { - selected = value - } - }) + subscribeToOutput() + } + + function subscribeToOutput() { + outputs.selectedTabIndex.subscribe( + { + id: 'subgridoutput-' + parentId, + next: (value) => { + selected = value + } + }, + selected + ) }