Web:Common:AdvancedSelector: add check if group index didn found

This commit is contained in:
Timofey Boyko 2022-03-29 17:53:52 +03:00
parent 0ffb92d56e
commit 866b75eef6

View File

@ -118,8 +118,10 @@ const Selector = (props) => {
const groupIndex = newGroupList.findIndex(
(newGroup) => group === newGroup.id
);
if (groupIndex) {
newGroupList[groupIndex].selectedCount++;
if (groupIndex > -1) {
newGroupList[groupIndex].selectedCount =
newGroupList[groupIndex].selectedCount + 1;
}
});
});