nit error for loading inputs

This commit is contained in:
Ruben Fiszel
2025-04-28 15:34:25 +02:00
parent e6b22ab135
commit ece397d6da
2 changed files with 11 additions and 1 deletions

View File

@@ -63,5 +63,5 @@ export async function mergeConfigWithConfigFile<T>(
opts: T
): Promise<T & SyncOptions> {
const configFile = await readConfigFile();
return Object.assign(configFile, opts);
return Object.assign(configFile ?? {}, opts);
}

View File

@@ -146,7 +146,10 @@
}
}
let inputTransformSchemaForm: InputTransformSchemaForm | undefined = undefined
let reloadError: string | undefined = undefined
async function reload(flowModule: FlowModule) {
reloadError = undefined
try {
const { input_transforms, schema } = await loadSchemaFromModule(flowModule)
validCode = true
@@ -189,6 +192,7 @@
}
} catch (e) {
validCode = false
reloadError = e?.message
}
}
@@ -477,6 +481,12 @@
error={failureModule}
noPadding
>
{#if reloadError}
<div
title={reloadError}
class="absolute left-2 top-2 rounded-full w-2 h-2 bg-red-300"
></div>
{/if}
<InputTransformSchemaForm
class="px-1 xl:px-2"
bind:this={inputTransformSchemaForm}