You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unmounting an <Image /> component produces the following error:
mapbox-gl.js:23344 Uncaught TypeError: Cannot read property 'removeImage' of undefined
at r.removeImage (mapbox-gl.js:23344)
at Function.Image.removeImage (image.js:96)
at Image.componentWillUnmount (image.js:42)
...
Expected behaviour
Be able to unmount an Image component without errors.
Possible solution
Also check for undefined style in when unmounting the Image component: if (map && getStyle()) {
Current behaviour
Unmounting an
<Image /
> component produces the following error:Expected behaviour
Be able to unmount an Image component without errors.
Possible solution
Also check for undefined style in when unmounting the Image component:
if (map && getStyle()) {
See:
react-mapbox-gl/src/image.tsx
Lines 74 to 79 in 498171f
Code to reproduce
Environment
Note: Also tried with mapbox-gl ^0.54.0
The text was updated successfully, but these errors were encountered: