CSR-110: add additional check to avoid console error in question-chain

This commit is contained in:
Adam Caouette 2022-08-29 18:05:47 -04:00
parent 916ff821f6
commit d6f7e60b07

View file

@ -118,7 +118,7 @@ export default {
return moldingQuestionsFromPageData && Object.keys(moldingQuestionsFromPageData).length > 0;
},
showThisQuestionChain(glass, i) {
if (glass.questions?.length < 1 || glass.isSuppressedPart) { return false; } // return false if no questions or if suppressed
if (!glass.questions || glass.questions?.length < 1 || glass.isSuppressedPart) { return false; } // return false if no questions or if suppressed
return this.currentGlassIndex === i || glass.answerData?.answerResult?.length > 0;
},
async forwardButtonAction() {