Skip to content

Commit

Permalink
1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lihang90 committed Jan 7, 2019
1 parent 112d2c9 commit 54a4266
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ function array2tree(arr, keyName = 'id', parentKeyName = 'pid') {
for(let i = 0; i < arr.length; i++){
if (!(keyName in arr[i]) || !(parentKeyName in arr[i])) {
console.error(`params index ${i} has not key ${keyName} or ${parentKeyName}`);
console.log(i);
return false;
break;
}
}
let map = {};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "array2tree",
"version": "1.1.2",
"version": "1.1.3",
"description": "array to tree,depend on id and pid ## 一维数组转换为树型结构",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 54a4266

Please sign in to comment.