Skip to content

Commit

Permalink
fix: only filter flow nodes on type (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak authored Jan 23, 2024
1 parent 50e4950 commit 769eea9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions titleBoundary/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
const updateDrawBoundaryNodeData = (flowData) => {
let newFlowData = flowData;
Object.entries(flowData)
.filter(([_nodeId, nodeData]) => nodeData["type"] === 10 && nodeData["data"] !== defaultDrawBoundaryNodeData)
.filter(([_nodeId, nodeData]) => nodeData["type"] === 10)
.forEach(([drawBoundaryNodeId, _drawBoundaryNodeData]) => newFlowData[drawBoundaryNodeId]["data"] = defaultDrawBoundaryNodeData);
return newFlowData;
}

const updatePropertyInformationNodeData = (flowData) => {
let newFlowData = flowData;
Object.entries(flowData)
.filter(([_nodeId, nodeData]) => nodeData["type"] === 12 && nodeData["data"] !== defaultPropertyInformationNodeData)
.filter(([_nodeId, nodeData]) => nodeData["type"] === 12)
.forEach(([propertyInfoNodeId, _propertyInfoNodeData]) => newFlowData[propertyInfoNodeId]["data"] = defaultPropertyInformationNodeData);
return newFlowData;
}
Expand Down

0 comments on commit 769eea9

Please sign in to comment.