From 518f9e81988234811a286e9df69d87c91c84ae16 Mon Sep 17 00:00:00 2001 From: Bryan Brancotte <bryan.brancotte@pasteur.fr> Date: Wed, 12 Jan 2022 13:59:40 +0100 Subject: [PATCH] Ignore option with empty value i.e: the default one Closing #239 --- src/viralhostrange/viralhostrangedb/static/js/browse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viralhostrange/viralhostrangedb/static/js/browse.js b/src/viralhostrange/viralhostrangedb/static/js/browse.js index 280327c8..4f9ac612 100644 --- a/src/viralhostrange/viralhostrangedb/static/js/browse.js +++ b/src/viralhostrange/viralhostrangedb/static/js/browse.js @@ -47,7 +47,7 @@ $(document).ready(function(){ .parentNode .querySelectorAll('[for="'+radio_id+'"]') .forEach(e => e.parentNode.removeChild(e)); - if(e.target.id != radio_id){ + if(e.target.value != ''){ add_badge(radio_id, e.target.parentNode.querySelectorAll("label")[0].textContent); } }else{ -- GitLab