From 36276772e72f97f795089c92564116aad5a97d9e Mon Sep 17 00:00:00 2001 From: Jonas Hasle Date: Fri, 13 Dec 2024 10:25:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Viser=20siste=20opph=C3=B8rte=20?= =?UTF-8?q?dato,=20ikke=20f=C3=B8rste=20i=20ArbeidsfoholdOpph=C3=B8rt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/saksbilde/venstremeny/PeriodeCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/saksbilde/venstremeny/PeriodeCard.tsx b/src/routes/saksbilde/venstremeny/PeriodeCard.tsx index 62fe9e0cc..e3ba94948 100644 --- a/src/routes/saksbilde/venstremeny/PeriodeCard.tsx +++ b/src/routes/saksbilde/venstremeny/PeriodeCard.tsx @@ -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 (