Skip to content

Commit

Permalink
Fix adresse-array
Browse files Browse the repository at this point in the history
  • Loading branch information
betsytraran committed Jan 15, 2025
1 parent aa8e7a1 commit 3c9d232
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ export const AlderspensjonForm = () => {
adresseUtenTilDato ||
_.get(formMethods.getValues(), 'pdldata.person.bostedsadresse')?.reduce((prev, curr) => {
if (
!prev.gyldigTilOgMed ||
!curr.gyldigTilOgMed ||
curr.gyldigTilOgMed?.isValid?.() === false ||
prev.gyldigTilOgMed?.isValid?.() === false
!prev?.gyldigTilOgMed ||
!curr?.gyldigTilOgMed ||
curr?.gyldigTilOgMed?.isValid?.() === false ||
prev?.gyldigTilOgMed?.isValid?.() === false
)
return null
return isAfter(parseISO(prev.gyldigTilOgMed), parseISO(curr.gyldigTilOgMed)) ? prev : curr
Expand Down

0 comments on commit 3c9d232

Please sign in to comment.