From 1f8f25a2ccf37434a0d23dee91cd050cc0449d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caroline=20L=C3=B6bhard?= <35564122+oracline@users.noreply.github.com> Date: Tue, 27 Aug 2024 20:59:01 +0200 Subject: [PATCH] [BUGFIX] FE Error: Uncaught TypeError: item.getAttribute #522 (#573) Adjust the code that manages address data in the Frontend to code used in Leaflet.js. Resolves issue #522. Co-authored-by: Dr. Caroline Loebhard --- Resources/Public/JavaScript/Frontend/GoogleMaps.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Public/JavaScript/Frontend/GoogleMaps.js b/Resources/Public/JavaScript/Frontend/GoogleMaps.js index f5279f0b..efa99bad 100644 --- a/Resources/Public/JavaScript/Frontend/GoogleMaps.js +++ b/Resources/Public/JavaScript/Frontend/GoogleMaps.js @@ -17,9 +17,9 @@ function ttAddressGoogleMaps() { var bounds = new google.maps.LatLngBounds(); - var records = document.getElementById("ttaddress__records"); - for (var i = 0; i < records.childNodes.length; i++) { - var item = records.childNodes[i]; + var records = document.getElementById("ttaddress__records").children; + for (var i = 0; i < records.length; i++) { + var item = records[i]; var marker = new google.maps.Marker({ map: obj.map,