SpoonOil / b2-website

A website for viewing Bloons TD Battles 2 stats via the data.ninjakiwi.com API
https://b2.lol
4 stars 7 forks source link

Place of user in search is tracked incorrectly if button is pressed multiple times #49

Closed DestructivForce closed 8 months ago

DestructivForce commented 10 months ago

Issue appears to happen due to how place is tracked in the search, the variable used by the search function is shared between events. If another search is triggered before the first search finishes, the variable rankIndex is set back to 1 early and both events start to increment the variable.

ex: image

vs expected result: image

Second example: image

vs expected result: image

DestructivForce commented 8 months ago

Didn't get marked as closed when the changes were merged