'Top' sorting always defaults to Year time period

Turns out, this was broken since we added support for a default top timeframe. That value was overriding the date of the user’s previous visit instead of just being a default value when there was no previous visit (new user or anon).

https://github.com/discourse/discourse/commit/33bc8c276d8db36513adf72a863db3d648613489

While at it, I noticed another bug where a returning user would not be redirected to the proper timeframe due to a variable not being named properly on the client-side… :man_facepalming:

https://github.com/discourse/discourse/commit/b792db9d92dedd5bcd9386f4169fb6c4ee1b55aa

Thanks @P16 for the report as we got to fix 2 bugs :raised_hands:

3 Likes