falling-fruit / falling-fruit-web

Mobile-friendly website for Falling Fruit
https://beta.fallingfruit.org
GNU General Public License v3.0
32 stars 14 forks source link

Invalid bounds and repeat calls to /types/counts API endpoint #339

Closed ezwelty closed 1 month ago

ezwelty commented 1 year ago

Loading /entry/3383 triggers three calls to /types/counts, the first of which is invalid:

Loading /map triggers two calls to /types/counts, the first of which is invalid:

When loading URLs with explicit map center and zoom (e.g. @40.04059999999998,-105.26319,16z), both problems go away: the API endpoint is only called once, and with the correct bounds.

That this issue only applies to the API calls to /types/counts – and not to e.g. /clusters or /locations – could be a clue. Somehow this API endpoint is called earlier than the others, and ends up using map bounds that are initialized to an invalid and premature value, which results in invalid data, which forces it to run again?

ezwelty commented 1 month ago

Fixed by #419 or earlier.