refactor: improve logout at asserts/index.js (#440)

This commit is contained in:
sigoden 2024-08-24 15:52:29 +08:00 committed by GitHub
parent 4bf92cc47a
commit 964bf61c37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -758,10 +758,10 @@ function logout() {
const url = baseUrl();
const xhr = new XMLHttpRequest();
xhr.open("AUTH", url, true, ":");
xhr.send();
setTimeout(() => {
xhr.onload = () => {
location.href = url;
}, 200);
}
xhr.send();
}
/**