mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Add error handling to redirectToSignup promise
Fixes #1078 - Add an otherwise error callback to the redirectToSignup promise
This commit is contained in:
parent
a5c35d451a
commit
6a5e399997
@ -74,9 +74,10 @@ function redirectToSignup(req, res, next) {
|
||||
if (users.length === 0) {
|
||||
return res.redirect('/ghost/signup/');
|
||||
}
|
||||
next();
|
||||
}).otherwise(function (err) {
|
||||
return next(new Error(err));
|
||||
});
|
||||
|
||||
next();
|
||||
}
|
||||
|
||||
// While we're here, let's clean up on aisle 5
|
||||
|
Loading…
Reference in New Issue
Block a user