Commit 7358b86a authored by Mikaël Salson's avatar Mikaël Salson

model.js: Prevent calling countRealCounts twice in a row

Its complexity is now linear and not constant anymore.

See #4057 and previous commits.
parent 8ba77030
Pipeline #105780 passed with stages
in 10 minutes and 7 seconds
......@@ -1321,8 +1321,9 @@ changeAlleleNotation: function(alleleNotation) { = top;
// top show cannot be greater than the number of clones
if (top > this.countRealClones())
top = this.countRealClones()
var max_clones = this.countRealClones();
if (top > max_clones)
top = max_clones;
this.current_top = top
var html_slider = document.getElementById('top_slider');
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