This commit is contained in:
Barış Soner Uşaklı
2018-02-12 17:12:18 -05:00
parent d1368eb549
commit 7b6282f530
7 changed files with 25 additions and 13 deletions

View File

@@ -71,12 +71,13 @@ Languages.list = function (callback) {
if (err) {
return next(err);
}
var lang;
try {
var lang = JSON.parse(file);
next(null, lang);
lang = JSON.parse(file);
} catch (e) {
next(e);
return next(e);
}
next(null, lang);
});
}, function (err, languages) {
if (err) {