aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2021-01-16 13:31:27 -0500
committerGalen Guyer <galen@galenguyer.com>2021-01-16 13:31:27 -0500
commit307651ab24877b31aba54cc2741c318bf7b705e4 (patch)
treeeca122ee61f196edd562d0dcfbea054d8579b605
parentb5f996ec8dd845f3294f9f71421c084d8f74130f (diff)
Patch failure for one-week current semester
-rw-r--r--src/MainPage.js2
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,