diff --git a/backend/src/v1/complaint/complaint.service.ts b/backend/src/v1/complaint/complaint.service.ts index 8c119acaa..848ff9557 100644 --- a/backend/src/v1/complaint/complaint.service.ts +++ b/backend/src/v1/complaint/complaint.service.ts @@ -1795,6 +1795,10 @@ export class ComplaintService { }; const _applyTimezone = (input: Date, tz: string, output: "date" | "time" | "datetime"): string => { + if (!input) { + return "N/A"; // No date, so just return a placeholder string for the report + } + const utcDate = toDate(input, { timeZone: "UTC" }); const zonedDate = toZonedTime(utcDate, tz);