Merge pull request #3162 from frissdiegurke/patch-1

fixed error-report within translator.js
v1.18.x
Julian Lam 10 years ago
commit cd2ed20f3d

@ -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 = {}
);
);

Loading…
Cancel
Save