Fix TypeError: Cannot read properties of null (reading '1')

This commit is contained in:
Alexey Safronov 2022-11-09 14:15:55 +03:00
parent 6046fe345a
commit 65bc045fe7

View File

@ -136,7 +136,9 @@ class InfoPanelStore {
reloadSelectionParentRoom = async () => {
if (!this.getIsRooms) return;
const currentFolderRoomId = this.selectedFolderStore.pathParts[1];
const currentFolderRoomId =
this.selectedFolderStore.pathParts &&
this.selectedFolderStore.pathParts[1];
const prevRoomId = this.selectionParentRoom?.id;
if (!currentFolderRoomId || currentFolderRoomId === prevRoomId) return;