Skip to content

Commit

Permalink
feat(index): only add to active cases timeseries when data exists for…
Browse files Browse the repository at this point in the history
… deaths + recoveries
  • Loading branch information
JayWelsh committed Aug 11, 2020
1 parent 2aecd2d commit d25bcc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ const IndexPage = () => {

useProvincialAggregateTimeline.push({date: date,...provinceToRunningTotal});
useNationalAggregateTimeseries.push({xAxisValue: moment(date), yAxisValue: runningTotal});
useNationalActiveAggregateTimeseries.push({xAxisValue: moment(date), yAxisValue: runningTotalActive});
if(dateToTotalRecovered[date] && dateToTotalDeaths[date]){
useNationalActiveAggregateTimeseries.push({xAxisValue: moment(date), yAxisValue: runningTotalActive});
}
useProvincialAggregate = provinceToRunningTotal;
currentTotalCases = runningTotal;
}
Expand Down

0 comments on commit d25bcc0

Please sign in to comment.