From 51ce61cc2058d441d821a00e6262927dd18c8044 Mon Sep 17 00:00:00 2001 From: digvijay26 Date: Wed, 17 Feb 2021 09:23:25 +0530 Subject: [PATCH] insight issue --- src/components/Profile.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 62bd431..6615669 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -864,6 +864,7 @@ export default { }) .then((response) => { var finalArray = []; + console.log("1"); response.data.data.forEach((template_) => { console.log("template_", template_); var keys = []; @@ -881,6 +882,8 @@ export default { comments: [], }, }; + console.log("2"); + if (this.templateList[i].bounceBoard) { obj.commentBox = this.templateList[i].commentBox; obj.metaData.comments = template_.comments; @@ -889,6 +892,8 @@ export default { obj.insightId = template_.insightId; } var fieldArray = []; + console.log("3"); + this.templateList[i].metaData.fields.forEach((element) => { var fieldobj = { fieldName: element.fieldName, @@ -898,9 +903,15 @@ export default { }; obj.metaData.fields.push(fieldobj); }); + console.log("4"); + finalArray.push(obj); - this.insightId = template_.insight._id; + if(template_.insight){ + this.insightId = template_.insight._id; + } }); + console.log("5"); + this.caseStudy.slides = finalArray; console.log("----", finalArray); console.log(this.templateList, "getSLideData==>"); -- 2.0.0