From 3bcd9d064219e21aa68ce32c5cd10ea667d979e7 Mon Sep 17 00:00:00 2001 From: suihan Date: Tue, 1 Dec 2020 21:21:08 +0900 Subject: [PATCH] fix #45 --- static/js/contributions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/contributions.js b/static/js/contributions.js index 9f86821..b351c80 100644 --- a/static/js/contributions.js +++ b/static/js/contributions.js @@ -67,7 +67,9 @@ function yearly(year) { } function monthly(year, month, posts) { - const monthPosts = posts.filter(post => post.date.getMonth() === month); + const monthPosts = posts.filter(post => + post.date.getFullYear().toString() === year && post.date.getMonth() === month + ); let liHtml = ''; for (const post of monthPosts) { liHtml += `