Commit bdd9c9e4 authored by Mikaël Salson's avatar Mikaël Salson

clones.js: 0 is different from undefined

Return undefined when the value is unknown. A 0 value may be meaningful.
The code has been changed by previous commits so that it can handle
undefined values.
parent 5b9ff659
......@@ -160,7 +160,7 @@ Clone.prototype = {
if (positions != null) {
return positions['stop'] - positions['start'] + 1
} else {
return 0;
return 'undefined';
}
},
......@@ -506,7 +506,7 @@ Clone.prototype = {
if (typeof this.seg != 'undefined' && typeof this.seg['3start'] != 'undefined'){
return this.seg['3start']-this.seg['5end']-1
}else{
return 0
return 'undefined'
}
},
......
......@@ -739,7 +739,7 @@ ScatterPlot.prototype = {
try{
var v = fct(i);
}catch(e){}
if (typeof v != "undefined" && v != 0){
if (typeof v != "undefined" && v!= 'undefined'){
if (v<min || typeof min == "undefined") min = v;
if (v>max || typeof max == "undefined") max = v;
}
......
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