[openstreetmap/openstreetmap-website] Fix month label index desync causing missing labels (PR #6725)
Tom Hughes
notifications at github.com
Mon Jan 19 20:18:40 UTC 2026
@tomhughes commented on this pull request.
Is there some easy way to reproduce this problem? or maybe you could add before after images of what it fixes or something? It's hard to visualise what's going on and how this fixes it at the moment...
> if (previousMonth === null) {
+ currentMonth += Math.round((monthLabelStartIndex - getMonthOfThisWeek(date)) / 12) * 12;
Can we not use `currentMonth` here rather than calling the function a second time?
```suggestion
currentMonth += Math.round((monthLabelStartIndex - currentMonth) / 12) * 12;
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6725#pullrequestreview-3679488968
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6725/review/3679488968 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260119/23f8a40e/attachment-0001.htm>
More information about the rails-dev
mailing list