diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index 21ab3e96a1..c296b047b4 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -133,7 +133,7 @@ } else { const label = oneOf[0]['title'] oneOfSelected = label - value = { ...(typeof value === 'object' ? value ?? {} : {}), label } + value = { ...(typeof value === 'object' ? (value ?? {}) : {}), label } } } } @@ -264,12 +264,12 @@ value == undefined || value == null ? '' : isObjectCat(inputCat) - ? JSON.stringify(value, null, 2) - : isRawStringEditor(inputCat) - ? typeof value == 'string' - ? value - : JSON.stringify(value, null, 2) - : undefined + ? JSON.stringify(value, null, 2) + : isRawStringEditor(inputCat) + ? typeof value == 'string' + ? value + : JSON.stringify(value, null, 2) + : undefined if (newRawValue != rawValue) { rawValue = newRawValue @@ -415,12 +415,12 @@ diffStatus?.diff == 'added' ? 'bg-green-300 dark:bg-green-800' : diffStatus?.diff === 'removed' - ? 'bg-red-300 dark:bg-red-800' - : diffStatus?.diff === 'same' - ? 'bg-surface' - : diffStatus?.diff === 'modified' || typeof diffStatus?.diff === 'object' - ? 'border-2 border-green-500 bg-surface' - : '' + ? 'bg-red-300 dark:bg-red-800' + : diffStatus?.diff === 'same' + ? 'bg-surface' + : diffStatus?.diff === 'modified' || typeof diffStatus?.diff === 'object' + ? 'border-2 border-green-500 bg-surface' + : '' )} data-schema-picker > @@ -563,7 +563,7 @@ {#if i < itemsLimit}
{#if itemsType?.type == 'number'} - + {:else if itemsType?.type == 'string' && itemsType?.contentEncoding == 'base64'} {:then Module} - + {/await} {:else if Array.isArray(itemsType?.enum)} {:else if itemsType?.type == 'resource' && itemsType?.resourceType && resourceTypes?.includes(itemsType.resourceType)} @@ -615,7 +618,7 @@ dispatch('blur') }} code={JSON.stringify(v, null, 2)} - bind:value={v} + bind:value={value[i]} /> {/await} {:else if itemsType?.type === 'object' && itemsType?.properties} @@ -625,11 +628,11 @@ {disablePortal} {disabled} schema={getSchemaFromProperties(itemsType?.properties)} - bind:args={v} + bind:args={value[i]} />
{:else} - + {/if}