Commit 1210b6ba authored by Mathieu Giraud's avatar Mathieu Giraud

js/germline_axis.js: pos(), defaults to "?", and always returns something

Should be more robust.
parent 94ef04b5
......@@ -107,7 +107,11 @@ GermlineAxis.prototype.init = function (values, fct) {
* */
GermlineAxis.prototype.pos = function(clone) {
var pos = this.applyConverter(clone);
return this.label_mapping[pos];
var p = this.label_mapping[pos];
if (typeof p == 'undefined') {
p = this.label_mapping["?"];
}
return (typeof p != 'undefined') ? p : { 'pos': 1 }
}
/**
......
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