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

Prevent unhandled errors when the component redraws after unmounting #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sangaline
Copy link

When the map component unmounts, it is possible for the redraw() method to be called when there is no longer a map element. For example:

image

This PR is a trivial change that checks for map._mapPane existing before calling map._getMapPanePos() which triggers the unhandled exception.

Both the src/ and lib/ versions have been updated, the patch version has been bumped, linting passes except for in the example/ directory where it was already failing, the code is tested and working, and I certify that the terms set out under "Developer's Certificate of Origin 1.1" are met by this contribution.

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.

1 participant