mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 02:25:55 +01:00
Handle callback errors
This commit is contained in:
@@ -202,6 +202,10 @@ Controllers.registerInterstitial = function(req, res, next) {
|
||||
userData: req.session.registration,
|
||||
interstitials: []
|
||||
}, function(err, data) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (!data.interstitials.length) {
|
||||
return next();
|
||||
}
|
||||
@@ -212,6 +216,10 @@ Controllers.registerInterstitial = function(req, res, next) {
|
||||
var errors = req.flash('error');
|
||||
|
||||
async.parallel(renders, function(err, sections) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
res.render('registerComplete', {
|
||||
errors: errors,
|
||||
sections: sections
|
||||
|
||||
Reference in New Issue
Block a user