Commit 5615c368 authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud
Browse files

tools.js: Robustness

Ensure that field is defined before accessing it.
parent c5ec20f6
......@@ -100,7 +100,7 @@ function computeStartStop(arrayToProcess,sequence){
// IMGT positions start at 1
start = arrayToProcess[fields[i].field+' start'] - 1;
stop = arrayToProcess[fields[i].field+' end'] - 1;
} else {
} else if (typeof arrayToProcess[fields[i].field] != 'undefined') {
sequence_to_search = arrayToProcess[fields[i].field].toUpperCase();
position = junction.indexOf(sequence_to_search);
if (position > -1 && sequence_to_search.length > 0) {
......
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