mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 23:30:36 +01:00
Merge pull request #3162 from frissdiegurke/patch-1
fixed error-report within translator.js
This commit is contained in:
@@ -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 = {}
|
||||
);
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user