mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
error checks missing return
This commit is contained in:
@@ -253,6 +253,9 @@ adminController.extend.widgets = function(req, res, next) {
|
|||||||
plugins.fireHook('filter:widgets.getWidgets', [], next);
|
plugins.fireHook('filter:widgets.getWidgets', [], next);
|
||||||
}
|
}
|
||||||
}, function(err, widgetData) {
|
}, function(err, widgetData) {
|
||||||
|
if (err) {
|
||||||
|
return next(err);
|
||||||
|
}
|
||||||
widgetData.areas.push({ name: 'Draft Zone', template: 'global', location: 'drafts' });
|
widgetData.areas.push({ name: 'Draft Zone', template: 'global', location: 'drafts' });
|
||||||
|
|
||||||
async.each(widgetData.areas, function(area, next) {
|
async.each(widgetData.areas, function(area, next) {
|
||||||
@@ -261,6 +264,9 @@ adminController.extend.widgets = function(req, res, next) {
|
|||||||
next(err);
|
next(err);
|
||||||
});
|
});
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
|
if (err) {
|
||||||
|
return next(err);
|
||||||
|
}
|
||||||
for (var w in widgetData.widgets) {
|
for (var w in widgetData.widgets) {
|
||||||
if (widgetData.widgets.hasOwnProperty(w)) {
|
if (widgetData.widgets.hasOwnProperty(w)) {
|
||||||
// if this gets anymore complicated, it needs to be a template
|
// if this gets anymore complicated, it needs to be a template
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ install.installDbDependencies = function(server_conf, next) {
|
|||||||
|
|
||||||
npm.load({}, function(err) {
|
npm.load({}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
npm.config.set('spin', false);
|
npm.config.set('spin', false);
|
||||||
|
|||||||
Reference in New Issue
Block a user