Skip to content

Commit

Permalink
fix(reports): add null check for missedItem in deleteSelectionFromPar…
Browse files Browse the repository at this point in the history
…entItem func
  • Loading branch information
FussuChalice committed Dec 7, 2024
1 parent 69633fa commit cfc2dbd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const useParentUncheckHandler = () => {
(item) => !oldSelectedList.includes(item)
)[0];

if (!missedItem) {
return oldSelectedList;
}

const missedItemParent = findParentIdByItem(groups, missedItem);

return oldSelectedList.filter((item) => item !== missedItemParent);
Expand Down

0 comments on commit cfc2dbd

Please sign in to comment.