We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc7ac25 commit e45249cCopy full SHA for e45249c
api/index.js
@@ -24,7 +24,7 @@ module.exports = async (req, res) => {
24
const years = _.range(2015, currentYear + 1);
25
const stars = await Promise.all(_.map(years, year => fetch(year)));
26
const doc = {};
27
- for (let i = 0; i < year; i++) {
+ for (let i = 0; i < years.length; i++) {
28
doc[years[i]] = `${stars[i]}*`;
29
}
30
const allStars = stars.reduce((acc, star) => acc + star);
0 commit comments