From e29aadf8a509090a785cac5641f892ed8f0d1e52 Mon Sep 17 00:00:00 2001 From: chihlasm Date: Wed, 18 Feb 2026 01:29:16 -0500 Subject: [PATCH] fix: guard NODE_TYPE_CONFIG lookup against 'answer' type Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/components/tree-editor/TreeCanvasNode.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/tree-editor/TreeCanvasNode.tsx b/frontend/src/components/tree-editor/TreeCanvasNode.tsx index 22f029f7..66f83233 100644 --- a/frontend/src/components/tree-editor/TreeCanvasNode.tsx +++ b/frontend/src/components/tree-editor/TreeCanvasNode.tsx @@ -132,7 +132,9 @@ export function TreeCanvasNode({ onToggleExpand() } - const config = NODE_TYPE_CONFIG[node.type] + const config = node.type in NODE_TYPE_CONFIG + ? NODE_TYPE_CONFIG[node.type as keyof typeof NODE_TYPE_CONFIG] + : NODE_TYPE_CONFIG.decision // fallback for 'answer' (rendered by AnswerStubCard) const TypeIcon = config.icon const getTitle = () => {