fix: skip availability check for services that are not included in API response

This commit is contained in:
Björn Fromme
2025-11-06 14:55:00 +01:00
parent a50bd205cd
commit eba2f8e503
+2 -2
View File
@@ -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
}
})
}
}
}