about summary refs log tree commit diff
path: root/uploader
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-01-06 11:23:31 -0600
committerFrederick Muriuki Muriithi2025-01-06 11:23:31 -0600
commit568fee5a9dd8d7b689af5e0486990f307c59287c (patch)
tree7ae487357dec74779fe4abb225c2cf6fbbcaa084 /uploader
parent7c4031b8d82888e32aacea820e701339bf02c724 (diff)
downloadgn-uploader-568fee5a9dd8d7b689af5e0486990f307c59287c.tar.gz
Use explicit names for variables to ease maintenance
Give the variables names that indicate what they are used for.
Diffstat (limited to 'uploader')
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-raw-files.html9
1 files changed, 5 insertions, 4 deletions
diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
index 3c94a43..3eb042e 100644
--- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html
+++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
@@ -420,10 +420,11 @@
 
   var handler_update_previews = (event) => {
       Object.entries(preview_tables_to_elements_map).forEach((mapentry) => {
-          var element = $(mapentry[1]);
-          if(element.length === 1) {
-              read_first_n_lines(
-                  element[0],
+          var preview_table = $(mapentry[0]);
+          var file_input = $(mapentry[1]);
+          if(file_input.length === 1) {
+              readFirstNLines(
+                  file_input[0].files[0],
                   10,
                   [(data) => {
                       update_preview(