Commit e6c578ca authored by flothoni's avatar flothoni
Browse files

model.js; fix error when diversity value is null

Link to #4070
parent 0fa4d88b
......@@ -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] != 'undefined') {
return this.diversity[key][time].toFixed(3);
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);
} else {
return this.diversity[key].toFixed(3);
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