diff --git a/src/store/index.js b/src/store/index.js index b8b5ffe16..359d9cb3b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -997,7 +997,7 @@ export const actions = { savePartQuestionAnswers(context, partQuestionAnswersArray) { // if part question answers have changed, reset subsequent question answers const previousResultsArray = context.getters.damage.partQuestionAnswers; - const havePartQuestionAnswersChanged = previousResultsArray.length !== partQuestionAnswersArray.length || + const havePartQuestionAnswersChanged = previousResultsArray?.length !== partQuestionAnswersArray.length || !previousResultsArray.every((x, i) => x.result === partQuestionAnswersArray[i].result); if (havePartQuestionAnswersChanged) {