diff --git a/api.ts b/api.ts index cfd6652..deb8900 100644 --- a/api.ts +++ b/api.ts @@ -48,7 +48,7 @@ function apply_guidance(doc: any) { function setAnchors(items, channelFirstChar, v1ds, v0ds, histKey) { for (let item of items) { // Update the last_price with the most recent price - const years = Object.keys(item.season); + const years = Object.keys(item.season).map(Number).filter(year => year >= 2020); if (years.length > 0) { const recentYear = Math.max(...years.map(Number)); const earlyYear = Math.min(...years.map(Number));