We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abf8b39 commit b0a3452Copy full SHA for b0a3452
lib/woqlClient.js
@@ -1086,16 +1086,16 @@ WOQLClient.prototype.getBranches = function(dbId){
1086
if (orgList.length>0){
1087
let orgObj = {}
1088
if(defaultOrg){
1089
- orgObj = orgList.find(element => element['name'] === defaultOrg)
1090
-
1091
- }else{
+ orgObj = orgList.find(element => element['name'] === defaultOrg)
+ }
+ //if I didn't find the default one I get the first result
1092
+ if (!orgObj){
1093
orgObj = orgList[0]
1094
}
1095
this.organization(orgObj['name'])
1096
1097
return orgList
1098
})
1099
1100
1101
module.exports = WOQLClient
0 commit comments