diff options
author | zsloan | 2020-12-29 15:03:22 -0600 |
---|---|---|
committer | zsloan | 2020-12-29 15:03:22 -0600 |
commit | 1bd2d85624e04966ed20ec84dc6ba2cfda85d794 (patch) | |
tree | a0a89dfcf14b4410871d9de7763c37bbde87fd8e | |
parent | c26304ed6a2937654794f908c13ccd3ba4a66453 (diff) | |
download | genenetwork2-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
-rw-r--r-- | wqflask/wqflask/static/new/javascript/show_trait.js | 6 |
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, |