summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'controllers')
-rw-r--r--controllers/games/root.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/controllers/games/root.js b/controllers/games/root.js
index 0483f55..4a4e80d 100644
--- a/controllers/games/root.js
+++ b/controllers/games/root.js
@@ -19,9 +19,7 @@ function makePageData(user) {
export function root_get(req, res) {
let page = makePageData(req.session.user);
- for (let i=0; i<page.games.length; i++) {
- page.games[i].data = JSON.parse(page.games[i].data);
- }
+ page.games.forEach(g => g.data = JSON.parse(g.data));
return res.render("games", page);
}