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

fix: Don't call potentially undefined closePopup function #6962

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

pke
Copy link
Contributor

@pke pke commented Jan 7, 2020

As a result of using importing Marker as ES6 module and not importing Popup the function closePopup does not exist on the marker object.

This is a quick fix. A better approach would be to make the popup register a move listener on the marker, while its open. And then close itself when the marker is moved.

Closes #6961

As a result of using importing Marker as ES6 module and *not* importing Popup the function `closePopup` does not exist on the marker object.

This is a quick fix. A better approach would be to make the popup register a move listener on the marker, while its open. And then close itself when the marker is moved.

Closes Leaflet#6961
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

Successfully merging this pull request may close these issues.

ES6 without importing Popup closePopup is not a function
2 participants