Commit 62b86286 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

Merge branch 'hotfix-c/3761-no-array-from' into 'dev'

model.js: discard Array.from

Closes #3761

See merge request !421
parents f8abd255 1e236e0c
Pipeline #65801 failed with stages
in 33 seconds
......@@ -911,23 +911,26 @@ changeAlleleNotation: function(alleleNotation) {
*/
getColorSelectedClone: function(){
var selected = this.getSelected()
var list_color = new Set()
if (selected.length == 0){
return false
}
var common_color;
for (var i = 0; i < selected.length; i++) {
var clone_id = selected[i]
var clone = this.clones[clone_id]
var color = clone.true_color;
list_color.add(color)
if (list_color.size == 2){
return false
if (common_color != color) {
if (common_color === undefined) {
common_color = color;
} else {
return false;
}
}
}
return Array.from(list_color)[0]
return common_color;
},
......
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