Merge pull request #3162 from frissdiegurke/patch-1

fixed error-report within translator.js
This commit is contained in:
Julian Lam
2015-05-21 10:19:26 -04:00

View File

@@ -283,11 +283,12 @@
}
try {
callback(JSON.parse(data.toString()));
data = JSON.parse(data.toString());
} catch (e) {
winston.error('Could not parse `' + filename + '.json`, syntax error? Skipping...');
callback({});
data = {};
}
callback(data);
});
}
@@ -307,4 +308,4 @@
typeof exports === 'object' ? exports :
typeof define === 'function' && define.amd ? {} :
translator = {}
);
);