Commit db18d827 authored by flothoni's avatar flothoni
Browse files

model_loader; fix jshint quality

Link to #4541
parent 3f27ec73
Pipeline #190854 failed with stages
in 3 minutes and 22 seconds
...@@ -509,23 +509,23 @@ Model_loader.prototype = { ...@@ -509,23 +509,23 @@ Model_loader.prototype = {
// Delete values of analysis that are not present in current loaded samples // Delete values of analysis that are not present in current loaded samples
var pos = 0 var pos = 0
for (var i = 0; i < analysis.id.length; i++) { for (var delpos = 0; delpos < analysis.id.length; delpos++) {
var file = analysis.id[i] var analysis_file = analysis.id[delpos]
if (samples.original_names.indexOf(file) == -1){ if (samples.original_names.indexOf(analysis_file) == -1){
// delete this value and decrease greater values // delete this value and decrease greater values
analysis.id.splice(i,1); // remove file analysis.id.splice(delpos,1); // remove file
analysis.order = removeEltAndDecrease(analysis.order, i) analysis.order = removeEltAndDecrease(analysis.order, delpos)
analysis.stock_order = removeEltAndDecrease(analysis.stock_order, i) analysis.stock_order = removeEltAndDecrease(analysis.stock_order, delpos)
i = i-1 delpos = delpos-1
} else { pos += 1 } } else { pos += 1 }
} }
pos = analysis.id.length pos = analysis.id.length
// Add values of samples that are not present in analysis // Add values of samples that are not present in analysis
for (var i = 0; i < samples.original_names.length; i++) { for (var addpos = 0; addpos < samples.original_names.length; addpos++) {
var file = samples.original_names[i] var sample_file = samples.original_names[addpos]
if (analysis.id.indexOf(file) == -1){ if (analysis.id.indexOf(sample_file) == -1){
analysis.id.push( file ) analysis.id.push( sample_file )
analysis.order.push(pos) analysis.order.push(pos)
analysis.stock_order.push(pos) analysis.stock_order.push(pos)
pos += 1 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