Commit 93b922ed authored by marc duez's avatar marc duez

segmenter.js : highlightCDR3() can be called even if segmenter is not build

needed for test 
parent 2a0eb13c
Pipeline #164423 passed with stages
in 8 minutes and 56 seconds
......@@ -414,7 +414,7 @@ Segment.prototype = {
for (var c_id = 0; c_id < self.m.clones.length; c_id++)
self.build_skeleton(c_id);
this.highligtCDR3()
this.highligtCDR3(self.m.localStorage && localStorage.getItem('segmenter_cdr3'))
} catch(err) {
sendErrorToDb(err, this.db);
}
......@@ -1285,7 +1285,11 @@ Segment.prototype = {
},
highligtCDR3: function(checked){
if (typeof checked == 'undefined') checked = document.getElementById("vdj_input_check").checked
if (typeof checked == 'undefined')
if (document.getElementById("vdj_input_check"))
checked = document.getElementById("vdj_input_check").checked
else
return
if (checked) {
this.highlight[0].field = "cdr3"
......@@ -1295,6 +1299,7 @@ Segment.prototype = {
this.highlight[0].field = ""
if (this.m.localStorage) localStorage.removeItem('segmenter_cdr3')
}
this.update()
}
......
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