Skip to content

Commit 6b048e1

Browse files
authored
Ensure default value for fileKeySort
1 parent 4ec9b20 commit 6b048e1

File tree

1 file changed

+1
-0
lines changed
  • libs/remix-ui/workspace/src/lib/utils

1 file changed

+1
-0
lines changed

libs/remix-ui/workspace/src/lib/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const contextMenuActions: MenuItems = [{
125125
}]
126126

127127
export const fileKeySort = (fileTree: any) => {
128+
fileTree = fileTree || {}
128129
const directories = Object.keys(fileTree).filter((key: string) => !key.includes('....blank') && fileTree[key].isDirectory)
129130

130131
directories.sort((a: string, b: string) => a.toLowerCase().localeCompare(b.toLowerCase()))

0 commit comments

Comments
 (0)