From 5dffd58561165fb554083310e5da49ae40ba32ea Mon Sep 17 00:00:00 2001 From: chris062689 Date: Sat, 24 Jun 2017 11:19:33 -0400 Subject: [PATCH] Always initalize game's issues and closed_issues fields. Check the length of issues instead of checking if it exists. Fixes #27 --- scripts/games/app.js | 6 +++--- site/themes/citra-bs-theme/layouts/game/single.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/games/app.js b/scripts/games/app.js index 3d48414..42e8a8d 100644 --- a/scripts/games/app.js +++ b/scripts/games/app.js @@ -177,10 +177,10 @@ function processGame(game) { // END SAVEFILE BLOCK // GITHUB ISSUES BLOCK + model.issues = []; + model.closed_issues = []; + if (model.github_issues != null && model.github_issues.length > 0) { - model.issues = []; - model.closed_issues = []; - model.github_issues.forEach(function(number) { let issue = githubIssues.find(x => x.number == number); if (issue == null) { diff --git a/site/themes/citra-bs-theme/layouts/game/single.html b/site/themes/citra-bs-theme/layouts/game/single.html index fb52b26..93994ed 100644 --- a/site/themes/citra-bs-theme/layouts/game/single.html +++ b/site/themes/citra-bs-theme/layouts/game/single.html @@ -121,7 +121,7 @@

Known Issues

- {{- if isset .Params "issues" }} + {{- if gt (len .Params.issues) 0 }}