about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--uploader/templates/genotypes/list-genotypes.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/uploader/templates/genotypes/list-genotypes.html b/uploader/templates/genotypes/list-genotypes.html
index 5b970ff..bcc2597 100644
--- a/uploader/templates/genotypes/list-genotypes.html
+++ b/uploader/templates/genotypes/list-genotypes.html
@@ -162,10 +162,14 @@
 
 {%block javascript%}
 <script type="text/javascript">
+
   $(function() {
       var dtGeneticMarkers = buildDataTable(
           "#tbl-genetic-markers",
-          JSON.parse($("#tbl-genetic-markers").attr("data-genetic-markers")),
+          (
+              $("#tbl-genetic-markers").length === 1 ?
+                  JSON.parse($("#tbl-genetic-markers").attr("data-genetic-markers")) :
+                  []),
           [
               {data: 'index'},
               {data: 'Name'},
@@ -174,6 +178,7 @@
               {data: 'Source'},
               {data: 'Source2'}
           ]);
-  })
+  });
+
 </script>
 {%endblock%}