Fixes a small issue with the redirect after logging in. If app.previousUrl is undefined (from accessing the page directly), login would fail to redirect you because of an error with indexOf on the undefined app.previousUrl.

This commit is contained in:
Andrew Darqui
2013-10-06 04:24:38 -04:00
parent ef47f3fd15
commit b2e81b5d17

View File

@@ -35,6 +35,9 @@ define(function() {
$('#login-error-notify').show(); $('#login-error-notify').show();
} else { } else {
$('#login-error-notify').hide(); $('#login-error-notify').hide();
if(!app.previousUrl) { app.previousUrl = '/'; }
if(app.previousUrl.indexOf('/reset/') != -1) if(app.previousUrl.indexOf('/reset/') != -1)
window.location.replace(RELATIVE_PATH + "/?loggedin"); window.location.replace(RELATIVE_PATH + "/?loggedin");
else else