Skip to content

Commit bb289bb

Browse files
committed
Fix for empty children with tree layout.
1 parent 377e9e6 commit bb289bb

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

d3.layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ d3.layout.tree = function() {
14861486
function firstWalk(node, previousSibling) {
14871487
var children = node.children,
14881488
layout = node._tree;
1489-
if (children) {
1489+
if (children && children.length) {
14901490
var n = children.length,
14911491
firstChild = children[0],
14921492
previousChild,

0 commit comments

Comments
 (0)