About this question
Everything was working fine with this component a couple days ago. Then I added an event and now I'm getting a strange error:
Uncaught Component class instance initialization error [Cannot read property 'g' of undefined] Callback failed: serviceComponent://ui.flexipage.components.page.FlexipageControllerV2/ACTION$getPage function: a.H.wd
Markup:
client side controller, I'm pretty sure it has to do with the init method because It says 'component initialization':
doInit : function(component, event, helper) { var questionlist = component.get("c.getQuestionList"); questionlist.setCallback(this, function(response){ var state = response.getState(); if(state == "SUCCESS"){ component.set("v.Questions",response.getReturnValue()); } }); component.set("v.index",0); $A.enqueueAction(questionlist); },apex controller:
public class QuestionViewerController { @AuraEnabled public static List getQuestionList(){ return [Select id,body__c,answer__c,Name,Type__c,Explanation__c,Category__c From Question__c]; } } Why getting Error: cannot read property 'g'?