浏览代码

chore: [Tree] fix treeUtil type when strict ts

chenyuling 3 年之前
父节点
当前提交
8370eec162
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/semi-foundation/tree/treeUtil.ts

+ 1 - 1
packages/semi-foundation/tree/treeUtil.ts

@@ -441,7 +441,7 @@ export function normalizeKeyList(keyList: any, keyEntities: KeyEntities, leafOnl
             res.push(key);
         });
     } else {
-        res = Array.from(keyList).filter((key: string) => keyEntities[key] && !isValid(keyEntities[key].children)) as string[];
+        res = (Array.from(keyList) as string[]).filter(key => keyEntities[key] && !isValid(keyEntities[key].children));
     }
     return res;
 }