From 9e86983ce283b080de20aea78326b30e5cb37e33 Mon Sep 17 00:00:00 2001 From: Mahesh Mahajan Date: Mon, 7 Oct 2024 14:13:04 +0530 Subject: [PATCH] Bug #228391 : [Webapp- course detail page] when openening the course detail page showing error - failed to fetch data please try again --- packages/nulp_elite/src/pages/content/joinCourse.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nulp_elite/src/pages/content/joinCourse.js b/packages/nulp_elite/src/pages/content/joinCourse.js index a8fc4c4a..03677b86 100644 --- a/packages/nulp_elite/src/pages/content/joinCourse.js +++ b/packages/nulp_elite/src/pages/content/joinCourse.js @@ -160,8 +160,12 @@ const JoinCourse = () => { if (_userId == data?.result?.content?.createdBy) { setIsOwner(true); } - const identifiers = - data?.result?.content?.children[0]?.children[0]?.identifier; + let identifiers; + if(data?.result?.content?.children[0]?.children){ + identifiers = data?.result?.content?.children[0]?.children[0]?.identifier; + }else{ + identifiers = data?.result?.content?.children[0]?.identifier + } console.log(identifiers, "setChildNode"); setChildNode(identifiers);