chore(react/store): cleanup

This commit is contained in:
moklick
2024-04-08 17:32:49 +02:00
parent 48ad9d3ccf
commit 4570b2494b
3 changed files with 22 additions and 13 deletions
@@ -138,7 +138,6 @@ export function StoreUpdater<NodeType extends Node = Node, EdgeType extends Edge
if (fieldValue === previousFieldValue) continue;
if (typeof props[fieldName] === 'undefined') continue;
// Custom handling with dedicated setters for some fields
if (fieldName === 'nodes') setNodes(fieldValue as Node[]);
else if (fieldName === 'edges') setEdges(fieldValue as Edge[]);