@@ -60,7 +60,7 @@ function getNodeDataAtTreeIndexOrNextIndex({
60
60
export function getDescendantCount ( { node, ignoreCollapsed = true } ) {
61
61
return (
62
62
getNodeDataAtTreeIndexOrNextIndex ( {
63
- getNodeKey : ( ) => { } ,
63
+ getNodeKey : ( ) => { } ,
64
64
ignoreCollapsed,
65
65
node,
66
66
currentIndex : 0 ,
@@ -106,12 +106,12 @@ function walkDescendants({
106
106
const selfInfo = isPseudoRoot
107
107
? null
108
108
: {
109
- node,
110
- parentNode,
111
- path : selfPath ,
112
- lowerSiblingCounts,
113
- treeIndex : currentIndex ,
114
- } ;
109
+ node,
110
+ parentNode,
111
+ path : selfPath ,
112
+ lowerSiblingCounts,
113
+ treeIndex : currentIndex ,
114
+ } ;
115
115
116
116
if ( ! isPseudoRoot ) {
117
117
const callbackResult = callback ( selfInfo ) ;
@@ -604,6 +604,7 @@ export function getNodeAtPath({
604
604
* @param {!function } getNodeKey - Function to get the key from the nodeData and tree index
605
605
* @param {boolean= } ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
606
606
* @param {boolean= } expandParent - If true, expands the parentNode specified by parentPath
607
+ * @param {boolean= } addAsFirstChild - If true, adds new node as first child of tree
607
608
*
608
609
* @return {Object } result
609
610
* @return {Object[] } result.treeData - The updated tree data
@@ -670,7 +671,7 @@ export function addNodeUnderParent({
670
671
insertedTreeIndex = nextTreeIndex ;
671
672
672
673
const children = addAsFirstChild
673
- ? [ newNode , ...parentNode . children ]
674
+ ? [ newNode , ...parentNode . children ]
674
675
: [ ...parentNode . children , newNode ] ;
675
676
676
677
return {
@@ -885,7 +886,7 @@ export function insertNode({
885
886
depth : targetDepth ,
886
887
minimumTreeIndex,
887
888
newNode,
888
- getNodeKey = ( ) => { } ,
889
+ getNodeKey = ( ) => { } ,
889
890
ignoreCollapsed = true ,
890
891
expandParent = false ,
891
892
} ) {
@@ -1093,9 +1094,9 @@ export function find({
1093
1094
const extraInfo = isPseudoRoot
1094
1095
? null
1095
1096
: {
1096
- path : selfPath ,
1097
- treeIndex : currentIndex ,
1098
- } ;
1097
+ path : selfPath ,
1098
+ treeIndex : currentIndex ,
1099
+ } ;
1099
1100
1100
1101
// Nodes with with children that aren't lazy
1101
1102
const hasChildren =
0 commit comments