Skip to content

Commit

Permalink
object -> array in type error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Alferov committed Aug 22, 2018
1 parent 54e37d2 commit 6745f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module.exports = function arrayToTree(data, options) {
);

if (!Array.isArray(data)) {
throw new TypeError('Expected an object but got an invalid argument');
throw new TypeError('Expected an array but got an invalid argument');
}

var grouped = groupByParents(deepClone(data), options);
Expand Down

0 comments on commit 6745f97

Please sign in to comment.