diff options
-rw-r--r-- | src/MainPage.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/MainPage.js b/src/MainPage.js index ae9c5a9..8e8bc22 100644 --- a/src/MainPage.js +++ b/src/MainPage.js @@ -6,7 +6,7 @@ const MainPage = (props) => { const data = props.data; const latest = data[data.length - 1]; const prior = data[data.length - (1 + props.timeDifference)]; - const priorPrior = data[data.length - (1 + props.timeDifference * 2)]; + const priorPrior = data[Math.max(0, data.length - (1 + props.timeDifference * 2))]; const positiveTestRate = Math.max( 0, |