Commit 0a4d9afb authored by flothoni's avatar flothoni
Browse files

model.js; update fix for null diversity values

Link to #4070
parent a6171a9c
Pipeline #219204 passed with stages
in 43 minutes and 36 seconds
......@@ -641,10 +641,12 @@ changeAlleleNotation: function(alleleNotation, update, save) {
// Diversity may not be stored in an Array for retrocompatiblitiy reasons
// See #1941 and #3416
if (typeof this.diversity[key][time] != null) {
return this.diversity[key][time]
} else if (typeof this.diversity[key][time] != 'undefined') {
return this.diversity[key][time].toFixed(3);
if (typeof this.diversity[key][time] != 'undefined') {
if (this.diversity[key][time] != null) {
return this.diversity[key][time].toFixed(3);
} else {
return this.diversity[key][time]
}
} else {
return this.diversity[key].toFixed(3);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment