fix: [clusterRelations:fork_tree] Prevent division by 0

pull/6120/head
mokaddem 2020-05-11 15:26:33 +02:00
parent 3acf2bd4cf
commit 595006f6af
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ function buildTree() {
root.y0 = 0;
var nodes = tree.nodes(root).reverse();
var links = tree.links(nodes);
var maxDepth = 0;
var maxDepth = 1;
var leftMaxTextLength = 0;
nodes.forEach(function(d) {
maxDepth = maxDepth > d.depth ? maxDepth : d.depth;