Skip to content

Commit

Permalink
fix: default routing connector list extraction changes (#1765)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarnaikjuspay authored Nov 19, 2024
1 parent f27529a commit 0c4fc5d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/screens/Routing/DefaultRouting.res
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ let make = (
value->getDictFromJsonObject->getString("profile_id", "") === profile
)

let connectors =
profileList
->Array.get(0)
->Option.getOr(JSON.Encode.null)
let connectors = switch profileList->Array.get(0) {
| Some(json) =>
json
->getDictFromJsonObject
->getArrayFromDict("connectors", [])
| _ => routingRespArray
}

let gatewayConnectors = connectors->Array.filter(connectorsItem => {
connectorList->Array.some(connectorListItem => {
Expand Down

0 comments on commit 0c4fc5d

Please sign in to comment.