Skip to content

Commit

Permalink
added optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
jagadeeswaran-zipstack committed Dec 19, 2024
1 parent b37efdd commit 2234a6c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,9 @@ function ManageDocsModal({
updatedData[key] = {
...value,
// Update the coverage array if it exists
coverage: value.coverage
? value.coverage.filter((id) => id !== idToRemove)
: value.coverage,
coverage: value?.coverage
? value?.coverage?.filter((id) => id !== idToRemove)
: value?.coverage,
};
return updatedData;
}, {});
Expand Down

0 comments on commit 2234a6c

Please sign in to comment.