From bb01d086223b0b546b851ee9c78471c544e505c3 Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Fri, 6 Feb 2026 23:55:09 -0500 Subject: [PATCH] Fixed application form error --- ui/src/components/application/ApplicationForm.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/src/components/application/ApplicationForm.vue b/ui/src/components/application/ApplicationForm.vue index 1e0c946..ee7b6fc 100644 --- a/ui/src/components/application/ApplicationForm.vue +++ b/ui/src/components/application/ApplicationForm.vue @@ -110,14 +110,17 @@ watch(() => showCoC.value, async () => { }); function convertToAge(dob: string) { + + if (dob === undefined) return ""; const [month, day, year] = dob.split('/').map(Number); let dobDate = new Date(year, month - 1, day); - return Math.floor( + let out = Math.floor( (Date.now() - dobDate.getTime()) / (1000 * 60 * 60 * 24 * 365.2425) ); + return Number.isNaN(out) ? "" : out; } @@ -132,7 +135,7 @@ function convertToAge(dob: string) {