Skip to content

Commit

Permalink
Fix university risk calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
erikao1998 committed Jun 27, 2024
1 parent 0da9b73 commit 67f1ca3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/server/util/algorithm/individualRisks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,16 @@ export const totalCountryRisk = (
}

export const universityRisk = (
university: string,
university: string | undefined,
countryUniversities: string[] | undefined
) => {
if (!countryUniversities) return null
if (!university) return null

if (countryUniversities.includes(university)) {
if (countryUniversities && countryUniversities.includes(university)) {
return 1
}
return 3

return null
return 3
}

export const dualUseRisk = (
Expand Down

0 comments on commit 67f1ca3

Please sign in to comment.