From 8b7c50f2b733670ff3d28538cde71f69a2e8319d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 16 Jul 2025 08:54:37 +0000 Subject: [PATCH] better error message for ill-defined flow --- cli/flow.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/flow.ts b/cli/flow.ts index 121e81f72a..798d294db7 100644 --- a/cli/flow.ts +++ b/cli/flow.ts @@ -27,7 +27,13 @@ export function replaceInlineScripts( localPath: string, removeLocks: string[] | undefined ) { - modules.forEach((m) => { + modules.forEach((m, i) => { + if (!m.value) { + throw Error( + `Module value is undefined for flow module ${i} in ${localPath}` + ); + return; + } if (m.value.type == "rawscript") { if (m.value.content.startsWith("!inline")) { const path = m.value.content.split(" ")[1];