stefanocudini / leaflet-search

Search stuff in a Leaflet map
https://opengeo.tech/maps/leaflet-search/
MIT License
772 stars 334 forks source link

'loc' will never be false #297

Closed thiagotalma closed 1 year ago

thiagotalma commented 2 years ago

This will never be valid and the alert will never be displayed:

_handleSubmit: function() {
    (...)

     if (loc === false)
        this.showAlert();

    (...)
}

Because:

L.latLng(null) === null;
L.latLng(false) === null;
L.latLng("whateaver") === null;
stefanocudini commented 1 year ago

hi @thiagotalma thanks from the PR you are right! I got to read it now, if you can resolve the conflicts I can include it

stefanocudini commented 1 year ago

solved in version 3.0.4