mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
closes #2537
This commit is contained in:
@@ -154,7 +154,13 @@ function getTemplatesListing(req, res, next) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
config = JSON.parse(config.toString());
|
||||
|
||||
try {
|
||||
config = JSON.parse(config.toString());
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
plugins.fireHook('filter:templates.get_config', config, next);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user