Skip to content

Commit

Permalink
refactor: WIP fix inplace mutation of state
Browse files Browse the repository at this point in the history
ref #3250
  • Loading branch information
shaman-apprentice committed Mar 31, 2023
1 parent 7846de4 commit 90692ae
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export class UpdateEdgePreviewsEffect {
]).pipe(
withLatestFrom(this.store.select(edgePreviewNodesSelector), this.store.select(edgesSelector)),
map(([[edgeMetric], edgePreviewNodes, edges]) => {
setEdgeVisibility(edgePreviewNodes, edges, edgeMetric)
const newEdges = structuredClone(edges)
setEdgeVisibility(edgePreviewNodes, newEdges, edgeMetric)
return setEdges({ value: edges })
})
)
Expand Down

0 comments on commit 90692ae

Please sign in to comment.