better error message for ill-defined flow

This commit is contained in:
Ruben Fiszel
2025-07-16 08:54:37 +00:00
parent 008303ef96
commit 8b7c50f2b7

View File

@@ -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];