mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: handle undefined returnTo on registerAbort
This commit is contained in:
@@ -220,7 +220,7 @@ authenticationController.registerAbort = function (req, res) {
|
||||
if (req.uid) {
|
||||
// Clear interstitial data and continue on...
|
||||
delete req.session.registration;
|
||||
res.redirect(nconf.get('relative_path') + req.session.returnTo);
|
||||
res.redirect(nconf.get('relative_path') + (req.session.returnTo || '/'));
|
||||
} else {
|
||||
// End the session and redirect to home
|
||||
req.session.destroy(() => {
|
||||
|
||||
Reference in New Issue
Block a user