User: ${history[i].user}
+Task: ${history[i].task}
+Time: ${history[i].time}
+Points gained: ${history[i].pointsGained}
+diff --git a/frontend/index.js b/frontend/index.js index 29d4c47..f6f6014 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -91,19 +91,25 @@ async function populateScreen() { } } - for (let i = (history.length -1); i >= 0; i-=1) { + try { + for (let i = (history.length -1); i >= 0; i-=1) { + historyPage.innerHTML += ` +
User: ${history[i].user}
+Task: ${history[i].task}
+Time: ${history[i].time}
+Points gained: ${history[i].pointsGained}
+User: ${history[i].user}
-Task: ${history[i].task}
-Time: ${history[i].time}
-Points gained: ${history[i].pointsGained}
-