Skip to content

Commit

Permalink
fix(jobs): recruitee api has nullable department (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoeori authored Sep 4, 2024
1 parent d82e2db commit fa67c67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jobs/utils/getListings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type Offer = {
careers_apply_url: string;
id: number;
position: number;
department: string;
department?: string;
location: string;
company_name: string;
};
Expand Down Expand Up @@ -98,7 +98,7 @@ async function getValidityStatuses(department?: Office): Promise<Offer[]> {

if (!department) {
offers.push(offer);
} else if (offer.department.match(officeToDepartmentRegex(department))) {
} else if (offer.department?.match(officeToDepartmentRegex(department))) {
offers.push(offer);
}
}
Expand Down

0 comments on commit fa67c67

Please sign in to comment.