aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-12-29 15:03:22 -0600
committerzsloan2020-12-29 15:03:22 -0600
commit1bd2d85624e04966ed20ec84dc6ba2cfda85d794 (patch)
treea0a89dfcf14b4410871d9de7763c37bbde87fd8e /wqflask
parentc26304ed6a2937654794f908c13ccd3ba4a66453 (diff)
downloadgenenetwork2-1bd2d85624e04966ed20ec84dc6ba2cfda85d794.tar.gz
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
Diffstat (limited to 'wqflask')
-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,