-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Removing map that has a tileLayer with minZoom set causes an error - undefined is not an object (evaluating 'el.style') #6486
Comments
Cannot reproduce with Firefox nor Chrome on Linux. Is this a Safari-specific issue? |
I don't believe so @IvanSanchez. I get the same error in the console in all 3 browsers. This gif is from chrome. Here is a slightly simpler example that errors for me in both Chrome 71 and Firefox 60 as well as Safari- https://plnkr.co/edit/T4qExnzu7KzbDJkIZlJK?p=preview |
I confirm. Looks like Lines 1619 to 1623 in 61ef177
|
This is pretty bothersome, as it will kill an unsuspecting (=not expecting errors from a normal operation) React app hiding/removing a React Leaflet Map: PaulLeCam/react-leaflet#625 This is the simplest reproduction I can think of in case it is any help: https://codepen.io/tkurki/pen/XWWNBmr |
Not able to reproduce using v1.8.0: https://plnkr.co/edit/SudJnPOVbG7Y901P?preview |
Steps to reproduce
https://codesandbox.io/s/ywn94996wj
minZoom: 18
Expected behavior
When using a tileLayer with minZoom set and the map zoomed out beyond the value of minZoom, removing the map should not cause an error
Current behavior
When using a tileLayer with minZoom set and the map zoomed out beyond the value of minZoom, removing the map causes an error
Environment
Additional context
Uncovered while using ReactLeaflet, initial bug report here - PaulLeCam/react-leaflet#551. Further investigation revealed that it appears to be a Leaflet issue.
Minimal example reproducing the issue
https://codesandbox.io/s/ywn94996wj
The text was updated successfully, but these errors were encountered: