From e87879970ab98903f33c1c78f89f534b44578dab Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 26 Mar 2026 09:30:20 -0700 Subject: [PATCH] fix TS errors --- server/src/repositories/checks/TimescaleChecksRepository.ts | 5 ++++- .../status-pages/TimescaleStatusPagesRepository.ts | 2 +- server/src/service/business/geoChecksService.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/src/repositories/checks/TimescaleChecksRepository.ts b/server/src/repositories/checks/TimescaleChecksRepository.ts index acbc33e99..db24e6512 100644 --- a/server/src/repositories/checks/TimescaleChecksRepository.ts +++ b/server/src/repositories/checks/TimescaleChecksRepository.ts @@ -140,7 +140,10 @@ export class TimescaleChecksRepository implements IChecksRepository { if (!mapped[mid]) { mapped[mid] = []; } - mapped[mid].push(checks[i]); + const check = checks[i]; + if (check !== undefined) { + mapped[mid].push(check); + } } // Ensure all requested IDs have an entry for (const id of monitorIds) { diff --git a/server/src/repositories/status-pages/TimescaleStatusPagesRepository.ts b/server/src/repositories/status-pages/TimescaleStatusPagesRepository.ts index c30392317..583e775b5 100644 --- a/server/src/repositories/status-pages/TimescaleStatusPagesRepository.ts +++ b/server/src/repositories/status-pages/TimescaleStatusPagesRepository.ts @@ -252,7 +252,7 @@ export class TimescaleStatusPagesRepository implements IStatusPagesRepository { showUptimePercentage: row.show_uptime_percentage, showAdminLoginLink: row.show_admin_login_link, showInfrastructure: row.show_infrastructure, - customCSS: row.custom_css ?? undefined, + customCSS: row.custom_css ?? "", createdAt: row.created_at.toISOString(), updatedAt: row.updated_at.toISOString(), }; diff --git a/server/src/service/business/geoChecksService.ts b/server/src/service/business/geoChecksService.ts index 315c57858..95b945f2a 100644 --- a/server/src/service/business/geoChecksService.ts +++ b/server/src/service/business/geoChecksService.ts @@ -20,7 +20,7 @@ export interface IGeoChecksService { dateRange: string; page?: number; rowsPerPage?: number; - continent: GeoContinent | GeoContinent[]; + continent?: GeoContinent | GeoContinent[]; }): Promise; }