mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
possible fix to req.flash err crash
This commit is contained in:
@@ -177,9 +177,13 @@ authenticationController.registerComplete = function (req, res, next) {
|
||||
|
||||
async.parallel(callbacks, function (_blank, err) {
|
||||
if (err.length) {
|
||||
req.flash('errors', err.filter(Boolean).map(function (err) {
|
||||
err = err.filter(Boolean).map(function (err) {
|
||||
return err.message;
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
if (err) {
|
||||
req.flash('errors', err);
|
||||
return res.redirect(nconf.get('relative_path') + '/register/complete');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user