Skip to content

Commit 9e74a96

Browse files
author
Philipp Alferov
committed
Remove redandunt object cloning
1 parent c6601fb commit 9e74a96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ module.exports = function arrayToTree(data, options) {
6666
throw new TypeError('Expected an object but got an invalid argument');
6767
}
6868

69-
var cloned = data.slice();
70-
var grouped = groupByParents(cloned, options);
69+
var grouped = groupByParents(data, options);
7170
return createTree(grouped, grouped[options.rootID], options.customID);
7271
};

0 commit comments

Comments
 (0)