diff --git a/assets/home/script.js b/assets/home/script.js index b1e2ff2..351f995 100644 --- a/assets/home/script.js +++ b/assets/home/script.js @@ -144,7 +144,7 @@ function initMap() { locationElement.html(locationElement.html().replace('$title', item.title)); locationElement.html(locationElement.html().replace('data-src="$image"', 'src="' + item.image + '"')); locationElement.html(locationElement.html().replace('data-href="$path"', 'href="' + item.path + '"')); - locationElement.html(locationElement.html().replace('$postalCode', (item.location.postalCode + " " + (item.location.addressLocality ?? "")).trim())); + locationElement.html(locationElement.html().replace('$postalCode', (item[textToSlug(locationField)].postalCode + " " + (item[textToSlug(locationField)].addressLocality ?? "")).trim())); locationElement.removeClass('d-none'); if (item[textToSlug(tagField)]) item[textToSlug(tagField)].slice(0, 2).forEach(function (besonderheitenItem) {