refactor(react): use array for nodeInternals, rename to nodes
This commit is contained in:
@@ -78,7 +78,7 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
|
||||
}
|
||||
|
||||
if (onClick) {
|
||||
const node = store.getState().nodeInternals.get(id)!;
|
||||
const node = store.getState().nodes.find((n) => n.id === id)!;
|
||||
onClick(event, { ...node });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user