From 2234a6ce4a270a7dfb124c24df1d7c27cdc79f1e Mon Sep 17 00:00:00 2001 From: jagadeeswaran-zipstack Date: Thu, 19 Dec 2024 16:28:55 +0530 Subject: [PATCH] added optional chaining --- .../custom-tools/manage-docs-modal/ManageDocsModal.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx b/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx index 281ccf05a..0688ac07e 100644 --- a/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx +++ b/frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx @@ -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; }, {});