From 7653b5aff2f9459ff507fa333a5b050990697444 Mon Sep 17 00:00:00 2001 From: prasadgkalamkar Date: Mon, 2 Dec 2024 18:09:37 +0530 Subject: [PATCH] Fix for orgDid missing value Signed-off-by: prasadgkalamkar --- src/components/User/UserDashBoard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/User/UserDashBoard.tsx b/src/components/User/UserDashBoard.tsx index 5c6f5b547..79f3c7e53 100644 --- a/src/components/User/UserDashBoard.tsx +++ b/src/components/User/UserDashBoard.tsx @@ -273,13 +273,13 @@ 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[0].orgDid + const orgDid = data && data.org_agents && data.org_agents.length > 0 && data.org_agents[0].orgDid; if (data?.data?.org_agents) { setWalletData(data?.data?.org_agents); } else { setWalletData([]); } - if(orgDid.includes(DidMethod.INDY)){ + if(orgDid && orgDid.includes(DidMethod.INDY)){ setIsW3C(false); } }