From 17b6bd458214802f6e17bda6a2045883e8b9847b Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Mon, 10 Jul 2023 10:01:37 -0400 Subject: [PATCH] CSR-1146 | Empty arrays are inserted on refresh - fix --- src/store/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 72faf237d..8ade2e5a5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1255,10 +1255,12 @@ export const actions = { additionalAuthFlag: "", }, partSelection: { - hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers, - hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers, - hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers, - hasManuallySelectedParts: !!context.state.applicationUser.pageData["vehicle-parts"], + hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers?.length, + hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers?.length, + hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers?.length, + hasManuallySelectedParts: + !!context.state.applicationUser.pageData["vehicle-parts"]?.partsOrQuestions + .length, }, vehicle: { year: vehicle.year,