Fixed crash when PWS is not available and checking for outdated mods

This commit is contained in:
Björn Dahlgren 2015-01-16 22:50:17 +01:00
parent b6d045d68a
commit 5b736432d0

View File

@ -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);