From 938c153c035baff129dc5eceb785ab079c2fcfde Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Oct 2022 02:51:05 +0200 Subject: [PATCH] optimize mainargsignature inference --- frontend/src/lib/infer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/infer.ts b/frontend/src/lib/infer.ts index be333700c0..8200c48ce4 100644 --- a/frontend/src/lib/infer.ts +++ b/frontend/src/lib/infer.ts @@ -12,7 +12,7 @@ export async function inferArgs( ): Promise { let lastRun = get(loadSchemaLastRun) let inferedSchema: MainArgSignature - if (code == lastRun[0] && lastRun[1]) { + if (lastRun && code == lastRun[0] && lastRun[1]) { inferedSchema = lastRun[1] } else { if (code == '') { code = ' ' }