Skip to content

Commit

Permalink
refactor(core): update node lookup on change
Browse files Browse the repository at this point in the history
  • Loading branch information
bcakmakoglu committed May 31, 2024
1 parent 77aa0bc commit 9f103fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,11 @@ export function useActions(state: State): Actions {
updateEdgeAction(oldEdge, newConnection, state.edges, findEdge, shouldReplaceId, state.hooks.error.trigger)

const applyNodeChanges: Actions['applyNodeChanges'] = (changes) => {
return applyChanges(changes, state.nodes)
const changedNodes = applyChanges(changes, state.nodes)

updateNodeLookup(state.nodeLookup, changedNodes)

return changedNodes
}

const applyEdgeChanges: Actions['applyEdgeChanges'] = (changes) => {
Expand Down

0 comments on commit 9f103fc

Please sign in to comment.