Open roliauo opened 4 years ago
If you're landing here from googling the error message, the original problem seems to be fixed as far as I can tell. You'll get the same error if you try and interact with the plugin before you've added it to the map.
Cannot read property 'getMode' of undefined at MapboxDraw.__webpack_exports__.default.api.getMode
mapbox-gl-js version: 1.12.0 mapbox-gl-draw version: 1.2.0
https://github.com/mapbox/mapbox-gl-draw/blob/main/src/setup.js the 'ctx' object missing events
add this line to solve this problem: