Assertion on onMove function on reactflow

This commit is contained in:
Lucas Oliveira 2023-07-08 00:12:04 -03:00
commit db990f2472

View file

@ -371,10 +371,11 @@ export default function Page({ flow }: { flow: FlowType }) {
<ReactFlow <ReactFlow
nodes={nodes} nodes={nodes}
onMove={() => { onMove={() => {
updateFlow({ if (reactFlowInstance)
...flow, updateFlow({
data: reactFlowInstance.toObject(), ...flow,
}); data: reactFlowInstance.toObject(),
});
}} }}
edges={edges} edges={edges}
onPaneClick={() => { onPaneClick={() => {