Skip to content

Commit

Permalink
fix: interstitial redirects failing if done via ajaxify
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Nov 1, 2018
1 parent 2df19c0 commit 3c8939a
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 @@ -214,7 +214,7 @@ Controllers.registerInterstitial = function (req, res, next) {
// No interstitials, redirect to home
const returnTo = req.session.returnTo || req.session.registration.returnTo;
delete req.session.registration;
return res.redirect(returnTo || nconf.get('relative_path') + '/');
return helpers.redirect(res, returnTo || nconf.get('relative_path') + '/');
}
var renders = data.interstitials.map(function (interstitial) {
return async.apply(req.app.render.bind(req.app), interstitial.template, interstitial.data || {});
Expand Down

0 comments on commit 3c8939a

Please sign in to comment.