mcguffin / acf-openstreetmap-field

WordPress ACF Field for OpenStreetMap
https://wordpress.org/plugins/acf-openstreetmap-field/
GNU General Public License v3.0
107 stars 21 forks source link

map-input.js:504 Uncaught TypeError: Cannot read properties of undefined (reading 'get') #108

Open bastien-martinent opened 8 months ago

bastien-martinent commented 8 months ago

Hi, I found a bug when you use 1 has a marker limit, the map have no marker and you try a search. i cant figure out why this.canAddmarker do not send a true and execute this code... but it cant find any marker and crash.

image

map-input.js:504 Uncaught TypeError: Cannot read properties of undefined (reading 'get') at t. (map-input.js:504:30) at t.fire (leaflet-src.js:606:1) at e._geocodeResultSelected (Control.Geocoder.js:1774:1) at t. (Control.Geocoder.js:1830:1) at HTMLLIElement.n (leaflet-src.js:2799:1)

margarita-boomCodes commented 7 months ago

I would like to report something similar, when the OSM field is attached to a taxonomy and there are no markers defined yet. For example, when you add a new taxonomy term:

When I click on a result after I hitting enter, I get the same error as above in the console log. The same thing happens, when I do a search, but there are no results and no "Nothing found" message.

margarita-boomCodes commented 5 months ago

@mcguffin I would like to report, that with the 1.5.6 Version the bug is fixed :)