@pablobm commented on this pull request.
I can't wrap my head around this one today 😓 At least I can reproduce the bug
and the fix locally: edit the map, then go and check out your heatmap, whether
the months render correctly or not.
> @@ -24,7 +25,7 @@ $(document).on("turbo:frame-load", function () {
weekColumn++;
const currentMonth = getMonthOfThisWeek(date);
if (previousMonth === null) {
- previousMonth = currentMonth;
+ previousMonth = currentMonth + (Math.round((monthLabelStartIndex -
currentMonth) / 12) * 12);
heatmap.find(`[data-month]:has( ~
[data-month="${previousMonth}"])`).remove();
Incidentally: what does this line do?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6725#pullrequestreview-3682138753
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6725/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev