Skip to content

Commit

Permalink
Merge pull request #110 from ejp-rd-vp/bugfix/109-fix-gene-search
Browse files Browse the repository at this point in the history
#109 - Fix gene search
  • Loading branch information
vabishaa authored Feb 14, 2024
2 parents 2a49ddb + c11c1b1 commit aaa4501
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/discovery/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
},
async getAssociatedOrphaCodesForHgncId(hgncId) {
let orphaCodes = []
await this.$axios.$get("/api/v1/genes/" + hgncId + "/mapping")
await this.$axios.$get("/api/v1/mapping/gene/" + hgncId)
.then(function(res) {
orphaCodes = res.orphaCodes
})
Expand Down Expand Up @@ -122,7 +122,7 @@ export default {
async handler() {
let orphaCodes = []
for (let i = 0; i < this.selectedCodesObjects.length; i++) {
if (this.selectedCodesObjects[i].orphaCode !== '0') {
if (this.selectedCodesObjects[i].orphaCode !== '0' && this.selectedCodesObjects[i].orphaCode !== undefined) {
orphaCodes.push(this.selectedCodesObjects[i].orphaCode)
} else {
const associatedOrphaCodes = await this.getAssociatedOrphaCodesForHgncId(this.selectedCodesObjects[i].hgncId)
Expand Down

0 comments on commit aaa4501

Please sign in to comment.