Skip to content

Commit a283bd9

Browse files
committed
Fix display of complex member genes without names
Refs pombase/pombase-gocam#144
1 parent e49d5c5 commit a283bd9

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎gocam_view/templates/gocam_view/index.html‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,12 @@
877877
}
878878
if (geneInfoMap[id]) {
879879
title = 'product: ' + geneInfoMap[id].product;
880-
if (geneInfoMap[id].name) {
881-
label = geneInfoMap[id].name;
880+
if (!label) {
881+
if (geneInfoMap[id].name) {
882+
label = geneInfoMap[id].name;
883+
} else {
884+
label = id;
885+
}
882886
}
883887
} else {
884888
// very hacky, pombe specific
@@ -967,8 +971,8 @@
967971
'<ul style="display: none" id="complex-members-list">';
968972
for (const id of currentData.has_part_genes) {
969973
let label = id;
970-
if (geneInfoMap[id]) {
971-
label = geneInfoMap[id];
974+
if (geneInfoMap[id] && geneInfoMap[id].name) {
975+
label = geneInfoMap[id].name;
972976
}
973977
if (highlightIds.has(id)) {
974978
newContent += '<li class="gene-in-complex highlighted-gene">' + makeLink('PomBase:' + id, label) + '</li>';

0 commit comments

Comments
 (0)