From 1bd2d85624e04966ed20ec84dc6ba2cfda85d794 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 29 Dec 2020 15:03:22 -0600 Subject: Used a try/catch to deal with situations where there's no SE/var column, since apparently var_nodes wasn't undefined, causing the previous check to not work --- wqflask/wqflask/static/new/javascript/show_trait.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 6918cf34..1025233b 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -448,15 +448,15 @@ edit_data_change = function() { if (is_number(sample_val) && sample_val !== "") { sample_val = parseFloat(sample_val); sample_sets[table].add_value(sample_val); - if (typeof var_nodes === 'undefined'){ - sample_var = null; - } else { + try { sample_var = var_nodes[_j].childNodes[0].value if (is_number(sample_var)) { sample_var = parseFloat(sample_var) } else { sample_var = null; } + } catch { + sample_var = null; } sample_dict = { value: sample_val, -- cgit v1.2.3