Hi, I use leaflet-geosearch^3.2.0 in my VueJs webapp with leaflet and vue2-leaflet modules.
I added to my mapObject GeoSearchControl object with OpenStreetMapProvider (but this issue is present also with AlgoliaProvider). When I type in the search bar a location I get this issue:
TypeError: Cannot read property 'label' of undefined.
In fact, as shown below,t.result is undefined .. I don't know why I have this issue but I think that t.label instead of t.result.label could solve it.
Using resultFormat: ({ result }) => result.labelas option doesn't solve this issue since result is undefined.
Thanks.
Hi, I use leaflet-geosearch^3.2.0 in my VueJs webapp with leaflet and vue2-leaflet modules. I added to my mapObject GeoSearchControl object with OpenStreetMapProvider (but this issue is present also with AlgoliaProvider). When I type in the search bar a location I get this issue:
TypeError: Cannot read property 'label' of undefined.
In fact, as shown below,
t.result
is undefined .. I don't know why I have this issue but I think thatt.label
instead oft.result.label
could solve it. UsingresultFormat: ({ result }) => result.label
as option doesn't solve this issue since result isundefined
. Thanks.