Fix expand path bug

pull/668/head
ioedeveloper 4 years ago
parent 87bb38838f
commit b8455eb48e
  1. 2
      libs/remix-ui/file-explorer/src/lib/file-explorer.tsx

@ -494,7 +494,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
if (!state.expandPath.includes(path)) {
expandPath = [...state.expandPath, path]
} else {
expandPath = state.expandPath.filter(key => !key.startsWith(path))
expandPath = state.expandPath.filter(key => key && (typeof key === 'string') && !key.startsWith(path))
}
setState(prevState => {

Loading…
Cancel
Save