Skip to content

Commit

Permalink
Fixed #1610 - Preserve the experiment branch after reseting the session.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Apr 1, 2020
1 parent 73783ba commit 6af36c8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,16 @@ async function getBreachStats(req, res) {


function logout(req, res) {
req.session.reset();
if (req.session.experimentBranch) {
// Persist experimentBranch across session reset
let experimentBranch = req.session.experimentBranch;
req.session.reset();
req.session.experimentBranch = experimentBranch;
} else {
req.session.reset();
}


res.redirect("/");
}

Expand Down

0 comments on commit 6af36c8

Please sign in to comment.