Skip to content

Commit f84c1a2

Browse files
committed
Avoid unnecessary deepEqual call
1 parent 1686333 commit f84c1a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tree/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default class Tree extends React.Component {
218218
.tree()
219219
.nodeSize(orientation === 'horizontal' ? [nodeSize.y, nodeSize.x] : [nodeSize.x, nodeSize.y])
220220
.separation(
221-
(a, b) => (deepEqual(a.parent, b.parent) ? separation.siblings : separation.nonSiblings),
221+
(a, b) => (a.parent.id === b.parent.id ? separation.siblings : separation.nonSiblings),
222222
)
223223
.children(d => (d._collapsed ? null : d._children));
224224

0 commit comments

Comments
 (0)