Merge pull request #1728 from xixixao/patch-1

Fix bug in updateNodePosDiff action
This commit is contained in:
Moritz Klack
2021-12-02 21:35:43 +01:00
committed by GitHub

View File

@@ -137,7 +137,7 @@ export default function reactFlowReducer(state = initialState, action: ReactFlow
const { id, diff, isDragging } = action.payload;
const nextNodes = state.nodes.map((node) => {
if (id === node.id || state.selectedElements?.find((sNode) => sNode.id === node.id)) {
if (id === node.id || (id == null && state.selectedElements?.find((sNode) => sNode.id === node.id))) {
const updatedNode = {
...node,
__rf: {