Also unset the returnTo after login

This commit is contained in:
Johannes Zellner
2015-10-01 16:22:46 +02:00
parent c552917991
commit 94ad633128

View File

@@ -19,7 +19,10 @@
// clear oauth2 state
delete window.localStorage.oauth2State;
if (window.localStorage.returnTo) window.location.href = window.localStorage.returnTo;
var returnTo = window.localStorage.returnTo;
delete window.localStorage.returnTo;
if (returnTo) window.location.href = returnTo;
else window.location.href = '/';
}