Skip to content

Commit

Permalink
refactor(20321): refactor loops!
Browse files Browse the repository at this point in the history
  • Loading branch information
vanch3d committed Apr 29, 2024
1 parent 4feba71 commit c66d871
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export const DataPolicyLoader: FC<PolicyLoaderProps> = ({ policyId }) => {
)

store.onNodesChange(nodeChanges)
edgeConnects.map((connection) => store.onConnect(connection))
for (const connection of edgeConnects) {
store.onConnect(connection)
}
store.setStatus(DesignerStatus.LOADED, { name: dataPolicy.id })
} catch (error) {
let message
Expand Down Expand Up @@ -131,7 +133,9 @@ export const BehaviorPolicyLoader: FC<PolicyLoaderProps> = ({ policyId }) => {
)

store.onNodesChange(nodeChanges)
edgeConnects.map((connection) => store.onConnect(connection))
for (const connection of edgeConnects) {
store.onConnect(connection)
}
store.setStatus(DesignerStatus.LOADED, { name: behaviorPolicy.id })
} catch (error) {
let message
Expand Down

0 comments on commit c66d871

Please sign in to comment.