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:
parent
b4f28ce2b1
commit
96bfefac5c
|
@ -18,7 +18,7 @@ export function viewTrackingRequired() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function handleLogoff(xhr) {
|
export function handleLogoff(xhr) {
|
||||||
if (xhr.getResponseHeader("Discourse-Logged-Out") && !_showingLogout) {
|
if (xhr && xhr.getResponseHeader("Discourse-Logged-Out") && !_showingLogout) {
|
||||||
_showingLogout = true;
|
_showingLogout = true;
|
||||||
const messageBus = Discourse.__container__.lookup("message-bus:main");
|
const messageBus = Discourse.__container__.lookup("message-bus:main");
|
||||||
messageBus.stop();
|
messageBus.stop();
|
||||||
|
|
Loading…
Reference in New Issue