hcui-package 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/tree.js +1 -1
- package/dist/hcui-package.es.js +2924 -2922
- package/dist/hcui-package.umd.js +1 -1
- package/package.json +1 -1
package/dist/commonjs/tree.js
CHANGED
|
@@ -25,7 +25,7 @@ export const convertArray2TreeData = (
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// 给每一层节点添加level属性
|
|
28
|
-
item.level = item[parentKey] ? map.get(item[parentKey]).level + 1 : 0
|
|
28
|
+
item.level = (item[parentKey] && map.get(item[parentKey])) ? map.get(item[parentKey]).level + 1 : 0
|
|
29
29
|
|
|
30
30
|
if (item[parentKey] && map.has(item[parentKey])) {
|
|
31
31
|
const parent = map.get(item[parentKey])
|