From f05734c1b3e7ff601e7eea14e3fb4947c1cc3ea6 Mon Sep 17 00:00:00 2001 From: prasadgkalamkar Date: Mon, 2 Dec 2024 19:26:30 +0530 Subject: [PATCH] optional chaining corrected Signed-off-by: prasadgkalamkar --- src/components/User/UserDashBoard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/User/UserDashBoard.tsx b/src/components/User/UserDashBoard.tsx index f3ba126c..980847a7 100644 --- a/src/components/User/UserDashBoard.tsx +++ b/src/components/User/UserDashBoard.tsx @@ -273,7 +273,7 @@ const UserDashBoard = () => { const response = await getOrganizationById(orgId); const { data } = response as AxiosResponse; if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { - const orgDid = data && data.org_agents && data.org_agents.length > 0 && data.org_agents[0].orgDid; + const orgDid = data?.org_agents?.[0].orgDid; if (data?.data?.org_agents) { setWalletData(data?.data?.org_agents); } else {