From db246ccefe6864f6ad5641307894658ddbc544ff Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Sun, 5 Oct 2025 15:47:42 +0200 Subject: [PATCH] better error messages --- src/VisualEditor/VisualEditor.tsx | 2 +- src/VisualEditor/parser.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/VisualEditor/VisualEditor.tsx b/src/VisualEditor/VisualEditor.tsx index af7e7a9..cd5e546 100644 --- a/src/VisualEditor/VisualEditor.tsx +++ b/src/VisualEditor/VisualEditor.tsx @@ -645,7 +645,7 @@ export function ArrowSVG(props: {arrow: Arrow, selected: string[], errors: strin data-parts="start end" /> - {props.errors.length>0 && {props.errors.join(' ')}} + {props.errors.length>0 && {props.errors.join(' ')}} 1) { - errorShapes.push(...state.initial.map(([uid,childState])=>[uid,"OR-state can only have 1 initial state"] as [string, string])); + errorShapes.push(...state.initial.map(([uid,childState])=>[uid,"multiple initial states"] as [string, string])); } else if (state.initial.length === 0) { - errorShapes.push([state.uid, "Needs initial state"]); + errorShapes.push([state.uid, "no initial state"]); } } }