Browse Source

fix: add missing conditionalSwitch case in quickstart validation

The createDefaultNodeData function in validation.ts had cases for router
and switch but was missing conditionalSwitch, despite it being listed in
VALID_NODE_TYPES and DEFAULT_DIMENSIONS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 5 months ago
parent
commit
46fbf3f0f2
  1. 15
      src/lib/quickstart/validation.ts

15
src/lib/quickstart/validation.ts

@ -399,6 +399,21 @@ function createDefaultNodeData(type: NodeType): WorkflowNodeData {
return {}; return {};
case "switch": case "switch":
return { inputType: null, switches: [{ id: "sw-1", name: "Output 1", enabled: true }] }; return { inputType: null, switches: [{ id: "sw-1", name: "Output 1", enabled: true }] };
case "conditionalSwitch":
return {
customTitle: null,
comment: null,
incomingText: null,
rules: [
{
id: "rule-" + Math.random().toString(36).slice(2, 9),
value: "",
mode: "contains",
label: "Rule 1",
isMatched: false,
}
]
};
case "glbViewer": case "glbViewer":
return { return {
glbUrl: null, glbUrl: null,

Loading…
Cancel
Save