adhocracy4 icon indicating copy to clipboard operation
adhocracy4 copied to clipboard

maps_react: fix indetermined execution order causing the polygon

Open goapunk opened this issue 10 months ago • 0 comments

callback to be executed before the map object is created. Instead of relying on the refs, use the useMap hook and conditional rendering for the polygon.

Not sure if this is the best approach but for now it makes the maps work again on design-dev

fixes https://github.com/liqd/a4-meinberlin/issues/5582

to reproduce the error add the following to your webpack.dev.js:

module.exports = merge(common, {
    devtool: 'eval-source-map',
    optimization: {
       'nodeEnv': 'production'
     }                                    
})                                                                          

and try to create a mapidea or proposal

Tasks

  • [ ] PR name contains story or task reference
  • [ ] Documentation (docs and inline)
  • [ ] Tests (including n+1 and django_assert_num_queries where applicable)
  • [ ] Changelog

goapunk avatar Apr 11 '24 13:04 goapunk