diff --git a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.hooks.ts b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.hooks.ts index 1d50ec6c0e..324273302b 100644 --- a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.hooks.ts +++ b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.hooks.ts @@ -132,9 +132,9 @@ export const useOptions = ( newFilter.searchArea = RoomSearchArea.Active; const state = { - title: roomsFolder.title, + title: roomsFolder?.title, isRoot: true, - rootFolderType: roomsFolder.rootFolderType, + rootFolderType: roomsFolder?.rootFolderType, }; const path = getCategoryUrl(CategoryType.Shared); @@ -145,7 +145,7 @@ export const useOptions = ( }, state, }; - }, [roomsFolder.rootFolderType, roomsFolder.title, userId]); + }, [roomsFolder?.rootFolderType, roomsFolder?.title, userId]); const onGoToPersonal = useCallback((): LinkProps => { const newFilter = FilesFilter.getDefault(); @@ -153,9 +153,9 @@ export const useOptions = ( newFilter.folder = myFolderId?.toString() ?? ""; const state = { - title: myFolder.title, + title: myFolder?.title, isRoot: true, - rootFolderType: myFolder.rootFolderType, + rootFolderType: myFolder?.rootFolderType, }; const path = getCategoryUrl(CategoryType.Personal); @@ -169,7 +169,7 @@ export const useOptions = ( }, state, }; - }, [myFolder.rootFolderType, myFolder.title, myFolderId]); + }, [myFolder?.rootFolderType, myFolder?.title, myFolderId]); const onCreateRoom = useCallback(() => { if (isWarningRoomsDialog) {