fix(react): respect custom default node type when falling back from unknown node type

This commit is contained in:
Ze-Zheng Wu
2025-07-05 18:11:27 +08:00
parent 549ec62d6d
commit 18514e118f
4 changed files with 53 additions and 1 deletions

View File

@@ -58,7 +58,7 @@ export function NodeWrapper<NodeType extends Node>({
if (NodeComponent === undefined) {
onError?.('003', errorMessages['error003'](nodeType));
nodeType = 'default';
NodeComponent = builtinNodeTypes.default;
NodeComponent = nodeTypes?.['default'] || builtinNodeTypes.default;
}
const isDraggable = !!(node.draggable || (nodesDraggable && typeof node.draggable === 'undefined'));