Skip to content

Node.js based forum software built for the modern web

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.

Andrew Darquib2e81b5d1780
diff --git a/public/src/forum/login.js b/public/src/forum/login.js
index ed4e0753f6..96e6c49e94 100644
--- a/public/src/forum/login.js
+++ b/public/src/forum/login.js
@@ -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;
-});
\ No newline at end of file
+});