From cc82297dc3fa1d132bd0dc982202a26890c2b375 Mon Sep 17 00:00:00 2001 From: Yoeri Otten Date: Wed, 4 Sep 2024 17:00:46 +0200 Subject: [PATCH] fix(jobs): recruitee api has nullable department --- 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); } }