From eba2f8e5031b39ed0b6d9bc4040bfa04b2b50a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 6 Nov 2025 14:55:00 +0100 Subject: [PATCH] fix: skip availability check for services that are not included in API response --- assets/controllers/booking_controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/controllers/booking_controller.js b/assets/controllers/booking_controller.js index 5ce0c6f..274b622 100644 --- a/assets/controllers/booking_controller.js +++ b/assets/controllers/booking_controller.js @@ -21,9 +21,9 @@ export default class extends Controller { availabilitiesValueChanged(availabilities) { this.fieldTargets.forEach((field) => { let id = field.value - if (false === field.checked && 0 >= availabilities[id].available) { + if (availabilities[id] && false === field.checked && 0 >= availabilities[id].available) { field.disabled = true } }) } -} \ No newline at end of file +}