Do not update form location fields when marker is not defined

This commit is contained in:
Senén Rodero Rodríguez
2020-04-30 19:33:59 +02:00
parent 240cad793f
commit 0ec1f6a4f8

View File

@@ -96,7 +96,11 @@
} }
if (editable) { if (editable) {
$(removeMarkerSelector).on("click", removeMarker); $(removeMarkerSelector).on("click", removeMarker);
map.on("zoomend", updateFormfields); map.on("zoomend", function() {
if (marker) {
updateFormfields();
}
});
map.on("click", moveOrPlaceMarker); map.on("click", moveOrPlaceMarker);
} }
if (addMarkerInvestments) { if (addMarkerInvestments) {