mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
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:
@@ -35,6 +35,9 @@ define(function() {
|
||||
$('#login-error-notify').show();
|
||||
} else {
|
||||
$('#login-error-notify').hide();
|
||||
|
||||
if(!app.previousUrl) { app.previousUrl = '/'; }
|
||||
|
||||
if(app.previousUrl.indexOf('/reset/') != -1)
|
||||
window.location.replace(RELATIVE_PATH + "/?loggedin");
|
||||
else
|
||||
@@ -63,4 +66,4 @@ define(function() {
|
||||
};
|
||||
|
||||
return Login;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user