Skip to content

Commit

Permalink
fix: fallback to label if no synonyms
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Aug 16, 2023
1 parent 9ae47c9 commit 8f74254
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/graph/knowledge_graph.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { toArray } = require('../utils');

const debug = require('debug')('bte:biothings-explorer-trapi:KnowledgeGraph');

module.exports = class KnowledgeGraph {
Expand Down Expand Up @@ -30,7 +32,7 @@ module.exports = class KnowledgeGraph {
},
{
attribute_type_id: 'biolink:synonym',
value: kgNode._names,
value: kgNode._names.length ? kgNode._names : toArray(kgNode._label),
},
// Currently unused
// {
Expand Down

0 comments on commit 8f74254

Please sign in to comment.