From 8ba7c916e945d82571954356135c23baad5efe03 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Tue, 8 Feb 2022 03:24:04 +0100 Subject: [PATCH] fix(plugins/stargazers): invalid month when using `chartist` mode (#848) [skip ci] --- source/plugins/stargazers/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/stargazers/index.mjs b/source/plugins/stargazers/index.mjs index c53b4918..ef9e8495 100644 --- a/source/plugins/stargazers/index.mjs +++ b/source/plugins/stargazers/index.mjs @@ -72,7 +72,7 @@ export default async function({login, graphql, data, imports, q, queries, accoun }, { labels:Object.keys(set).map((date, i, a) => { const day = date.substring(date.length - 2) - if ((i === 0) || ((a[i + 1]) && (date.substring(0, 7) !== a[i + 1].substring(0, 7)))) + if ((i === 0) || ((a[i - 1]) && (date.substring(0, 7) !== a[i - 1].substring(0, 7)))) return `${day} ${months[Number(date.substring(5, 7))]}` return day }),