aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js6
1 files 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,