Skip to content

Commit

Permalink
Merge pull request #1586 from Vizzuality/fix/logistic-map-crash
Browse files Browse the repository at this point in the history
Guard for subnationalYears as logistic maps was crashing
  • Loading branch information
tomasmoose authored Oct 16, 2020
2 parents 78258d0 + e3a8a3d commit e6cd1dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function Timeline(props) {
{years.map((year, i) => {
const isActive = year === state.start || year === state.end;
const statusClassName = getClassName(year, state);
const isSubNational = subNationalYears.indexOf(year) > -1;
const isSubNational = subNationalYears?.indexOf(year) > -1;
return (
<li
ref={i === 0 ? refs.item : undefined}
Expand Down

0 comments on commit e6cd1dd

Please sign in to comment.