Fix crash if there are no photos in the velopark data

This commit is contained in:
Pieter Vander Vennet 2024-01-15 00:13:25 +01:00
parent 505844b64a
commit 7445ad5fc2

View file

@ -44,7 +44,7 @@ export default class VeloparkLoader {
properties["operator:phone"] = VeloparkLoader.phoneValidator.reformat(veloparkData.contactPoint?.telephone, () => "be")
}
veloparkData.photos.forEach((p, i) => {
veloparkData.photos?.forEach((p, i) => {
if (i === 0) {
properties["image"] = p.image
} else {