mirror of
https://github.com/discourse/discourse.git
synced 2025-03-28 09:06:41 +08:00
FIX: Avoid error on ajax.abort() when client has not opened the request.
This commit is contained in:
parent
8cfd887f33
commit
a6d93f6317
@ -105,6 +105,8 @@ export function ajax() {
|
||||
};
|
||||
|
||||
args.error = (xhr, textStatus, errorThrown) => {
|
||||
// 0 represents the `UNSENT` state
|
||||
if (xhr.readyState === 0) return;
|
||||
handleLogoff(xhr);
|
||||
|
||||
// note: for bad CSRF we don't loop an extra request right away.
|
||||
|
Loading…
x
Reference in New Issue
Block a user