From 83135966f72a8f5cd2bd838cb6215022587b6b9f Mon Sep 17 00:00:00 2001 From: "Schiller, Tjorben" Date: Tue, 12 Dec 2023 14:31:17 +0100 Subject: [PATCH] fix: set openingTimes property to fix no-network error --- src/services/api_service_dataport.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/api_service_dataport.js b/src/services/api_service_dataport.js index d107f7a..993322c 100644 --- a/src/services/api_service_dataport.js +++ b/src/services/api_service_dataport.js @@ -361,8 +361,9 @@ export class ApiServiceDataport { }) Object.assign(institution, migrateOpeningHours(institutionDto)) + if (!institution.openingTimes) institution.openingTimes = {} if (institutionDto.specialOpeningHours) institution.openingTimes.description = institutionDto.specialOpeningHours - if (institutionDto.closedDays) { + if (institutionDto.closedDays && institutionDto.closedDays.length > 0) { if (!institution.closedHolidays) institution.closedHolidays = [] institutionDto.closedDays.map(element => institution.closedHolidays.push(element.text)) }