Skip to content

Commit

Permalink
Initialize object before setting value (#6173)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zangetsu101 committed Nov 8, 2023
1 parent 56a9c54 commit 0e8cfcc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export const fieldToDeceasedDateTransformation =
fieldValue = clonedTransformedData[sectionId][field.name]
}

transformedData[
alternativeSectionId ? alternativeSectionId : sectionId
].deceased = {
transformedData[alternativeSectionId ?? sectionId] ??= {}

transformedData[alternativeSectionId ?? sectionId].deceased = {
deceased: true,
deathDate: fieldValue
}
Expand Down

0 comments on commit 0e8cfcc

Please sign in to comment.