From 5b736432d011a24e49ebd5ef6a471289b1e7cfe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Dahlgren?= Date: Fri, 16 Jan 2015 22:50:17 +0100 Subject: [PATCH] Fixed crash when PWS is not available and checking for outdated mods --- routes/mods.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/mods.js b/routes/mods.js index 7864df7..540619a 100644 --- a/routes/mods.js +++ b/routes/mods.js @@ -70,7 +70,7 @@ exports.index = function(req, res){ async.map(mods, function (mod, cb) { var modPath = path.join(config.path, mod); isPlayWithSixMod(modPath, function (isPlayWithSixMod) { - cb(null, { name: mod, outdated: outdatedMods.indexOf(mod) >= 0, playWithSix: isPlayWithSixMod }); + cb(null, { name: mod, outdated: outdatedMods && outdatedMods.indexOf(mod) >= 0, playWithSix: isPlayWithSixMod }); }); }, function (err, mods) { res.send(mods);