Skip to content

Commit

Permalink
make showgames not fail if there's no runtimeInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Nov 17, 2014
1 parent d34b2b8 commit b5c4587
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions public/scripts/showgames.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ console.log(obj);
for (var ii = 0; ii < obj.length; ++ii) {
var game = obj[ii];
var runtimeInfo = game.runtimeInfo;
var hftInfo = runtimeInfo.info.happyFunTimes;
// Not sure how I should figure out the name and screenshot.
var basePath = game.controllerUrl.substring(0, game.controllerUrl.lastIndexOf('/') + 1);
var dev = (runtimeInfo.originalGameId != hftInfo.gameId) ? "(*)" : "";
game.name = dev + (hftInfo.name || runtimeInfo.originalGameId);
game.screenshotUrl = game.screenshotUrl;
items.push(Strings.replaceParams(template, game));
if (!runtimeInfo) {
} else {
var hftInfo = runtimeInfo.info.happyFunTimes;
// Not sure how I should figure out the name and screenshot.
var basePath = game.controllerUrl.substring(0, game.controllerUrl.lastIndexOf('/') + 1);
var dev = (runtimeInfo.originalGameId != hftInfo.gameId) ? "(*)" : "";
game.name = dev + (hftInfo.name || runtimeInfo.originalGameId);
game.screenshotUrl = game.screenshotUrl;
items.push(Strings.replaceParams(template, game));
}
}
var html = items.join("");
if (html != oldHtml) {
Expand Down

0 comments on commit b5c4587

Please sign in to comment.