When unmounting the map component, an error occurs stating that mapHook.map.map.style is undefined. This is due to an incorrect property access in the useSource.ts file on line 31.
Steps To Reproduce
Unfortunately I couldn't reproduce the error in the Storybook...
💡 But I did find that when I changed the line above directly in the dist in my codebase, that the error was fixed and the component properly remounts.
The current behavior
It crashes when the map unmounts. Full stack trace:
@mapcomponents/react-maplibre version: 1.0.5 (latest)
When unmounting the map component, an error occurs stating that mapHook.map.map.style is undefined. This is due to an incorrect property access in the useSource.ts file on line 31.
Steps To Reproduce
Unfortunately I couldn't reproduce the error in the Storybook... 💡 But I did find that when I changed the line above directly in the dist in my codebase, that the error was fixed and the component properly remounts.
The current behavior
It crashes when the map unmounts. Full stack trace:
The expected behavior
I expect it not to crash. :)