Refactoring.

This commit is contained in:
Tatiana Lopaeva 2023-11-30 14:06:33 +03:00
parent 8b3247435d
commit a794543e5b

View File

@ -310,11 +310,9 @@ const FilesSelector = ({
if (index !== maxLength && currentFolderIndex !== -1) {
foundParentId = true;
!isSelectedParentFolder && setIsSelectedParentFolder(true);
}
if (foundParentId && !isSelectedParentFolder)
setIsSelectedParentFolder(true);
if (index === maxLength && !foundParentId && isSelectedParentFolder)
setIsSelectedParentFolder(false);