fix: guard NODE_TYPE_CONFIG lookup against 'answer' type

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-18 01:29:16 -05:00
parent c0856c0b75
commit e29aadf8a5

View File

@@ -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 = () => {