mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Prevent errors in IE11 following AJAX request
In some situations, the xhr object is undefined, so check that it's present before continuing
This commit is contained in:
@@ -18,7 +18,7 @@ export function viewTrackingRequired() {
|
||||
}
|
||||
|
||||
export function handleLogoff(xhr) {
|
||||
if (xhr.getResponseHeader("Discourse-Logged-Out") && !_showingLogout) {
|
||||
if (xhr && xhr.getResponseHeader("Discourse-Logged-Out") && !_showingLogout) {
|
||||
_showingLogout = true;
|
||||
const messageBus = Discourse.__container__.lookup("message-bus:main");
|
||||
messageBus.stop();
|
||||
|
||||
Reference in New Issue
Block a user