From 4cd71b466dc0968942479596e16e3f9ab18d2b50 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 3 Jan 2023 15:56:50 -0500 Subject: [PATCH] Fixed logic assigning 'current parts or questions' collection when going back a page --- src/mixins/vehicle-questions-mixin.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 29888c9c8..dc1cf0a71 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -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; }