flattentree
filip mertens 10 months ago
parent 702c8cb088
commit d57de28dd6
  1. 3
      libs/remix-ui/workspace/src/lib/reducers/workspace.ts

@ -895,8 +895,9 @@ const flattenTree = (files, expandPath: string[]) =>{
console.log('flattenTree', files, expandPath)
const flatTree = {}
const mapChild = (file: FileType) => {
console.log('mapChild', file)
flatTree[file.path] = file
expandPath && expandPath.includes(file.path) &&
expandPath && expandPath.find((path) => path.startsWith(file.path)) &&
file.child && Object.keys(file.child).map((key) => {
mapChild(file.child[key])
})

Loading…
Cancel
Save