mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: #8943, session mismatch modal thrown on login (race condition)
This commit is contained in:
@@ -194,7 +194,7 @@ app.cacheBuster = null;
|
||||
};
|
||||
|
||||
app.handleInvalidSession = function () {
|
||||
if (app.flags._logout) {
|
||||
if (app.flags._login || app.flags._logout) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@ define('forum/login', ['jquery-form'], function () {
|
||||
headers: {
|
||||
'x-csrf-token': config.csrf_token,
|
||||
},
|
||||
beforeSend: function () {
|
||||
app.flags._login = true;
|
||||
},
|
||||
success: function (data) {
|
||||
$(window).trigger('action:app.loggedIn', data);
|
||||
var pathname = utils.urlToLocation(data.next).pathname;
|
||||
|
||||
Reference in New Issue
Block a user