gdesmott / manger-veggie

GNU Affero General Public License v3.0
5 stars 4 forks source link

define markers_cluster before using it #48

Closed drzraf closed 6 years ago

drzraf commented 6 years ago

markers_cluster is used by the JSON callback function. We received by email the following report (Firefox 54 only):

TypeError: markers_cluster is undefined sur map.js ligne 54

Although we don't have a reproducer, from a code perspective it may possible if the JSON is returned quickly enough (ex: cached). Moving markers_cluster definition earlier should make us safe against such a case.

NB: wasn't able to test it (python manage.py runserver threw me an error)

gdesmott commented 6 years ago

Thanks for the patch. I just merged and deployed it.