Merge pull request #1214 from Safelite/feature/CSR-1146

CSR-1146 | Check for empty arrays (present after refresh)
This commit is contained in:
scottkiener 2023-07-10 10:06:48 -04:00 committed by GitHub
commit e16891ce72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1255,10 +1255,12 @@ export const actions = {
additionalAuthFlag: "", additionalAuthFlag: "",
}, },
partSelection: { partSelection: {
hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers, hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers?.length,
hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers, hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers?.length,
hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers, hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers?.length,
hasManuallySelectedParts: !!context.state.applicationUser.pageData["vehicle-parts"], hasManuallySelectedParts:
!!context.state.applicationUser.pageData["vehicle-parts"]?.partsOrQuestions
.length,
}, },
vehicle: { vehicle: {
year: vehicle.year, year: vehicle.year,