Skip to content

Commit

Permalink
Merge pull request #1037 from DTS-STN/139724-NewScenarios
Browse files Browse the repository at this point in the history
bug  189595  fix
  • Loading branch information
MarcoGoC authored Mar 28, 2024
2 parents 60302f1 + 199dbc4 commit 4c6d127
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/api/definitions/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ export const RequestSchema = Joi.object({
})
}

const duration: MonthsYears = JSON.parse(oasDeferDuration)
const duration: MonthsYears =
oasDeferDuration !== undefined
? JSON.parse(oasDeferDuration)
: { years: 0, months: 0 }

const durationFloat = duration.years + duration.months / 12

if (livingCountry === LivingCountry.CANADA) {
Expand Down

0 comments on commit 4c6d127

Please sign in to comment.