diff --git a/public/src/translator.js b/public/src/translator.js index ba6350ff59..ddee683739 100644 --- a/public/src/translator.js +++ b/public/src/translator.js @@ -220,7 +220,12 @@ return winston.error(err.message); } - callback(JSON.parse(data.toString())); + try { + callback(JSON.parse(data.toString())); + } catch (e) { + winston.error('Could not parse `' + filename + '.json`, syntax error? Skipping...'); + callback({}); + } }); }