From b8455eb48e7312aa5fc78b0155df3c23f4f522e9 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 16 Dec 2020 10:44:12 +0100 Subject: [PATCH] Fix expand path bug --- libs/remix-ui/file-explorer/src/lib/file-explorer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx b/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx index dde43f8bdf..84dcb5a972 100644 --- a/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx +++ b/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 => {