fix(frontend): Check if hiddenInlineScripts are undefined before iterating over them (#1134)

This commit is contained in:
Faton Ramadani
2023-01-20 11:49:43 +01:00
committed by GitHub
parent ac94b57726
commit 161c39544c
2 changed files with 2 additions and 2 deletions
@@ -17,7 +17,7 @@
{/if}
{/each}
{#each $app.hiddenInlineScripts as script, index (script.name)}
{#each $app?.hiddenInlineScripts ?? [] as script, index (script.name)}
{#if $selectedComponent === `bg_${index}`}
<PanelSection title={`Background script inputs`}>
<InputsSpecsEditor
@@ -52,7 +52,7 @@
/>
{/if}
{/each}
{#each $app.hiddenInlineScripts as hiddenInlineScript, index (index)}
{#each $app?.hiddenInlineScripts ?? [] as hiddenInlineScript, index (index)}
{#if `bg_${index}` === selectedScriptComponentId}
{#if hiddenInlineScript.inlineScript}
<InlineScriptEditor