diff options
author | Galen Guyer <galen@galenguyer.com> | 2021-01-16 13:31:27 -0500 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2021-01-16 13:31:27 -0500 |
commit | 307651ab24877b31aba54cc2741c318bf7b705e4 (patch) | |
tree | eca122ee61f196edd562d0dcfbea054d8579b605 /src/MainPage.js | |
parent | b5f996ec8dd845f3294f9f71421c084d8f74130f (diff) |
Patch failure for one-week current semester
Diffstat (limited to 'src/MainPage.js')
-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, |