Skip to content

Commit

Permalink
fix: bad assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Mar 4, 2021
1 parent fbe9215 commit c8b7865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Controllers.login = async function (req, res) {
}

// Occasionally, x-return-to is passed a full url. Also, connect-ensure-login passes the relative path. Strip both.
req.session.returnTo = req.session.returnTo.replace(nconf.get('base_url'), '').replace(nconf.get('relative_path'), '');
req.session.returnTo = req.session.returnTo && req.session.returnTo.replace(nconf.get('base_url'), '').replace(nconf.get('relative_path'), '');

data.alternate_logins = loginStrategies.length > 0;
data.authentication = loginStrategies;
Expand Down

0 comments on commit c8b7865

Please sign in to comment.