Skip to content

Commit b0a3452

Browse files
update woqlClient
1 parent abf8b39 commit b0a3452

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/woqlClient.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,16 +1086,16 @@ WOQLClient.prototype.getBranches = function(dbId){
10861086
if (orgList.length>0){
10871087
let orgObj = {}
10881088
if(defaultOrg){
1089-
orgObj = orgList.find(element => element['name'] === defaultOrg)
1090-
1091-
}else{
1089+
orgObj = orgList.find(element => element['name'] === defaultOrg)
1090+
}
1091+
//if I didn't find the default one I get the first result
1092+
if (!orgObj){
10921093
orgObj = orgList[0]
10931094
}
10941095
this.organization(orgObj['name'])
10951096
}
10961097
return orgList
10971098
})
1098-
10991099
}
11001100

11011101
module.exports = WOQLClient

0 commit comments

Comments
 (0)