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