mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05: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
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue