euanwm / OpenWeightlifting

Repository that is deployed for the OpenWeightlifting site
https://www.openweightlifting.org
BSD 3-Clause "New" or "Revised" License
31 stars 21 forks source link

Events page - range switching #288

Open euanwm opened 7 months ago

euanwm commented 7 months ago

Describe the bug When toggling between various ranges, if you selected a range twice in a row then it would pass a blank / null value. As a workaround, I added in a few lines to catch a null value and instead pass the default range value instead.

To Reproduce Steps to reproduce the behavior:

  1. Go to the events result page
  2. Select 30 days from the dropdown
  3. Select 30 days again

Expected behavior Selected ranges - regardless of the amount of times it is selected - shouldn't result in a null value existing.