Commit abc1eb97 authored by Aron Fiechter's avatar Aron Fiechter
Browse files

Do not crash when no results

parent 3ead8211
......@@ -22,6 +22,7 @@ export default function YearRange() {
const yearCounts = nodes
.filter((n) => n.leaf)
.map((n) => resultsById[n.name])
.filter((n) => n)
.flatMap((n) => n.years)
.reduce((counts, y) => {
if (counts[y]) counts[y] = counts[y] + 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment