Skip to content

Commit

Permalink
🐛 Viser siste opphørte dato, ikke første i ArbeidsfoholdOpphørt
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashas committed Dec 13, 2024
1 parent 0878017 commit 3627677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/saksbilde/venstremeny/PeriodeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const ArbeidsforholdOpphørt = ({
(it) => it.sluttdato !== null && dayjs(it.sluttdato, ISO_DATOFORMAT).isSameOrBefore(periode.tom),
);
const sisteOpphørteArbeidsforhold =
[...arbeidsforhold].sort((a, b) => (dayjs(a.sluttdato, ISO_DATOFORMAT).isBefore(b.sluttdato) ? -1 : 1))?.[0]
[...arbeidsforhold].sort((a, b) => (dayjs(a.sluttdato, ISO_DATOFORMAT).isBefore(b.sluttdato) ? 1 : -1))?.[0]
?.sluttdato ?? null;

return (
Expand Down

0 comments on commit 3627677

Please sign in to comment.