Skip to content

Commit

Permalink
fixing bug where first gene would click if is_multigene set
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Jan 22, 2024
1 parent 3ff046d commit 08f0e43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions www/js/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ document.addEventListener('DOMContentLoaded', () => {

// auto-select the first gene in the list
const first_gene = document.querySelector('.gene-result-list-item');
if (first_gene) {
if (!is_multigene && first_gene) {
first_gene.click();
}

Expand All @@ -94,7 +94,7 @@ document.addEventListener('DOMContentLoaded', () => {
hideOrganismSelectorToolip();
updateAnnotationDisplay();

// If the user is logged in and doesn't have a default org ID or it's different from their current,
// If the user is logged in and doesn't have a default org ID or it's different from their current,
// show the control
if (CURRENT_USER.session_id) {
if (CURRENT_USER.default_org_id === undefined || CURRENT_USER.default_org_id !== currently_selected_org_id) {
Expand Down
6 changes: 1 addition & 5 deletions www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ document.addEventListener('DOMContentLoaded', () => {
// get the value of the single-multi radio box
const single_multi = document.querySelector('input[name="single-multi"]:checked').value;

if (single_multi === 'single') {
url += '&is_multigene=0';
} else {
url += '&is_multigene=1';
}
url += single_multi === 'single' ? '&is_multigene=0' : '&is_multigene=1';

// add the gene lists
// TODO: This will only be for labeling purposes, since individual genes could have been
Expand Down

0 comments on commit 08f0e43

Please sign in to comment.