From fa67c670bfca06cd7ae366938235ef6b82b9ace1 Mon Sep 17 00:00:00 2001 From: Yoeri Otten Date: Wed, 4 Sep 2024 18:13:54 +0200 Subject: [PATCH] fix(jobs): recruitee api has nullable department (#584) --- src/jobs/utils/getListings.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jobs/utils/getListings.ts b/src/jobs/utils/getListings.ts index b63453198..4448b81de 100644 --- a/src/jobs/utils/getListings.ts +++ b/src/jobs/utils/getListings.ts @@ -70,7 +70,7 @@ type Offer = { careers_apply_url: string; id: number; position: number; - department: string; + department?: string; location: string; company_name: string; }; @@ -98,7 +98,7 @@ async function getValidityStatuses(department?: Office): Promise { if (!department) { offers.push(offer); - } else if (offer.department.match(officeToDepartmentRegex(department))) { + } else if (offer.department?.match(officeToDepartmentRegex(department))) { offers.push(offer); } }