Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on marker false and hideMarkerOnCollapse true #312

Open
hupe13 opened this issue Feb 2, 2023 · 0 comments
Open

error on marker false and hideMarkerOnCollapse true #312

hupe13 opened this issue Feb 2, 2023 · 0 comments

Comments

@hupe13
Copy link

hupe13 commented Feb 2, 2023

if (this.options.hideMarkerOnCollapse) {
this._map.removeLayer(this._markerSearch)
}

You should check if marker exists, e.g. if marker != false.
I get an error if I set marker: false and hideMarkerOnCollapse: true:

Uncaught TypeError: right-hand side of 'in' should be an object, got undefined collapse path-to-/leaflet-search/dist/leaflet-search.src.js:263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant