Skip to content

Commit

Permalink
Debug og bedre typesjekk
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbjoern committed Nov 20, 2023
1 parent 41ff5de commit d0c4703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ const Index = ({ søknader }: { søknader: Søknad[] }) => {
}, [søknader]);

useEffect(() => {
if (sisteSøknad?.innsendtDato) {
if (sisteSøknad != undefined && sisteSøknad.innsendtDato != undefined) {
const erEldreEnn14Uker = isBefore(new Date(sisteSøknad.innsendtDato), sub(new Date(), { weeks: 14 }));
if (erEldreEnn14Uker) {
if (erEldreEnn14Uker && Object.hasOwn(window, 'hj')) {
// @ts-ignore-line
window?.hj('trigger', 'aap_brev_undersokelse');
} else {
Expand Down

0 comments on commit d0c4703

Please sign in to comment.