From b67d00540b7adfac3550299d50fc9a620b5a6e2e Mon Sep 17 00:00:00 2001 From: Faton Ramadani Date: Tue, 5 Dec 2023 15:03:49 +0100 Subject: [PATCH] fix(frontend): infer args if the schema is not an object (#2782) --- frontend/src/lib/infer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/infer.ts b/frontend/src/lib/infer.ts index 29fda07ffd..73990ab321 100644 --- a/frontend/src/lib/infer.ts +++ b/frontend/src/lib/infer.ts @@ -210,7 +210,8 @@ function argSigToJsonSchemaType( export async function loadSchemaFromPath(path: string, hash?: string): Promise { if (path.startsWith('hub/')) { const { content, language, schema } = await ScriptService.getHubScriptByPath({ path }) - if (schema && 'properties' in schema) { + + if (schema && typeof schema === 'object' && 'properties' in schema) { return schema } else { const newSchema = emptySchema() @@ -222,6 +223,7 @@ export async function loadSchemaFromPath(path: string, hash?: string): Promise