Fixed logic assigning 'current parts or questions' collection when going back a page

This commit is contained in:
Leah Schumann 2023-01-03 15:56:50 -05:00
parent 4de6827dd5
commit 4cd71b466d

View file

@ -476,18 +476,24 @@ export default {
let currentPartsOrQuestions = null;
if (
currentPage !== fmgPageValues.CAPABILITY_QUESTIONS &&
this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS) &&
!!pageDataCapabilityQuestions
) {
currentPartsOrQuestions = pageDataCapabilityQuestions?.partsOrQuestions;
} else if (
currentPage !== fmgPageValues.MOLDING_QUESTIONS &&
this.currentPageComesAfterPage(currentPage, fmgPageValues.MOLDING_QUESTIONS) &&
!!pageDataMoldingQuestions
) {
currentPartsOrQuestions = pageDataMoldingQuestions?.partsOrQuestions;
} else if (currentPage !== fmgPageValues.VEHICLE_PARTS && !!pageDataVehicleParts) {
} else if (
this.currentPageComesAfterPage(currentPage, fmgPageValues.VEHICLE_PARTS) &&
!!pageDataVehicleParts
) {
currentPartsOrQuestions = pageDataVehicleParts?.partsOrQuestions;
} else if (currentPage !== fmgPageValues.PARTS_QUESTIONS && !!pageDataPartQuestions) {
} else if (
this.currentPageComesAfterPage(currentPage, fmgPageValues.PARTS_QUESTIONS) &&
!!pageDataPartQuestions
) {
currentPartsOrQuestions = pageDataPartQuestions?.partsOrQuestions;
}