From 236c953b8ef700151042940ece18d0681c34041b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilhem=20Semp=C3=A9r=C3=A9?= Date: Wed, 9 Oct 2024 16:25:01 +0200 Subject: [PATCH] Fixed bug in switching from species to another level --- src/main/webapp/js/moduleListCustomisation.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/webapp/js/moduleListCustomisation.js b/src/main/webapp/js/moduleListCustomisation.js index 75e1ac61..200ddc63 100644 --- a/src/main/webapp/js/moduleListCustomisation.js +++ b/src/main/webapp/js/moduleListCustomisation.js @@ -39,8 +39,7 @@ function grabNcbiTaxon(inputObj, taxonId) var taxonDetails = getNcbiTaxonDetails(taxonId), taxonName = taxonDetails['scientificname'], genus = taxonDetails['genus'], species = taxonDetails['species']; if (taxonName != null && taxonName != '') $(inputObj).attr('data-id', taxonId); - if (species != null && species != '') - $(inputObj).attr('data-species', genus + " " + species); + $(inputObj).attr('data-species', species != null && species != '' ? (genus + " " + species) : null); if (typeof setDirty != 'undefined' && $(inputObj).val() != taxonId) setDirty($(inputObj).closest("tr").attr("id").substring(4), true);