Hi I have been getting a weird error when trying to set an attribute in the lightning component. This attribute has been pass to the child component from its parent. The attribute that I am trying to set here and the cause of the error is v.optionWrapper listed in the code below in the last line. This attribute has been passed to child component and getting this error when trying to set ist value in the child component.

Error: Maximum call stack size exceeded when trying to set an Attribute in lightning component

var optionWr = component.get("v.optionWrapper");
    if(optionWr.oliRatingVersion.NES_Details__c != undefined){
         var NESData = optionWr.oliRatingVersion.NES_Details__c;
         var NesArray = NESData.split("\n");
         var NesArray1 = []; 
         for(var i=0;i<NesArray.length;i++){
             if(NesArray[i]!='' && NesArray[i].includes(":")){
         var NesArray2 = []; 
         for(var i=0;i<NesArray1.length;i++){

         optionWr.Customer_Name = NesArray2[0];
         optionWr.Customer_Address = NesArray2[1]; 
         optionWr.Customer_Phone = NesArray2[2]; 
         optionWr.Customer_Email = NesArray2[3];

         optionWr.DataCenter_Operator = NesArray2[4]; 
         optionWr.DataCenter_CenterName = NesArray2[5]; 
         optionWr.DataCenter_Address = NesArray2[6]; 
         optionWr.DataCenter_TechnicalContact = NesArray2[7]; 

         optionWr.NES_Notes = NesArray2[8];
         optionWr.NESData = NESData; 

         var event = component.getEvent("cpqHandleNESDetailsEvt");
         event.setParams({ "optionWrapper" : optionWr});


  • 2
    does this code get executed in a change handler on v.optionWrapper?
    – Mark Pond
    Jan 31, 2019 at 22:23
  • Yes it does. That`s where the exact problem defined the error occurs Feb 1, 2019 at 14:26


You must log in to answer this question.

Browse other questions tagged .