Skip to content

Commit

Permalink
Fix saving branches without color attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Seraff committed Jun 21, 2023
1 parent 0f64611 commit e31bfb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/phylotree-ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,10 @@ end;

phylotree.to_taxus_newick = function(annotations = false){
if (annotations){
return phylotree.get_newick(function(e){ return e.annotation ? "[" + e.annotation + "]" : "" })
return phylotree.get_newick(function(e){
let annotation = e.stringifiedAnnotation()
return annotation.length > 0 ? "[" + annotation + "]" : ""
})
} else {
return phylotree.get_newick(function(e){ return "" })
}
Expand Down

0 comments on commit e31bfb7

Please # to comment.