Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/search/ElasticEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type ProjectInput = Project & { mentors: Mentor[], tags: Tag[], projectPreferenc
function getTimezoneOffset(timezoneString?: string) {
if (!timezoneString) return -7;
const basicLookup = getTimezoneOffsetInner(timezoneString);
if (basicLookup) return basicLookup;
if (basicLookup !== null) return basicLookup;
return {
'America - Pacific': -7,
'America - Mountain': -6,
Expand All @@ -119,7 +119,7 @@ function getTimezoneOffset(timezoneString?: string) {
SGT: 8,
Singapore: 8,
'APAC - Singapore': 8,
}[timezoneString || ''] || -7;
}[timezoneString || ''] ?? -7;
}

export function projectToElasticEntry({
Expand Down
2 changes: 1 addition & 1 deletion src/search/getProjectMatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function isStudentUnderrepresented(student: Student): boolean {

async function getTimezone(student: Student): Promise<number> {
if (student.timezone) {
return getTimezoneOffset(student.timezone) || -7;
return getTimezoneOffset(student.timezone) ?? -7;
}

const profile = <
Expand Down
Loading
Loading