CSR-108: allow for cases where there is no damage state saved
This commit is contained in:
parent
53f1b61176
commit
813cd34009
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue