Skip to content

Commit 6745f97

Browse files
author
Philipp Alferov
committed
object -> array in type error message
1 parent 54e37d2 commit 6745f97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module.exports = function arrayToTree(data, options) {
9696
);
9797

9898
if (!Array.isArray(data)) {
99-
throw new TypeError('Expected an object but got an invalid argument');
99+
throw new TypeError('Expected an array but got an invalid argument');
100100
}
101101

102102
var grouped = groupByParents(deepClone(data), options);

0 commit comments

Comments
 (0)