Improve logout from worker (#30775)

A quick fix for #30756
This commit is contained in:
wxiaoguang 2024-04-30 23:35:42 +08:00 committed by GitHub
parent 564102ce89
commit a988237eb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 2 deletions

View file

@ -0,0 +1,9 @@
import {sleep} from '../utils.js';
const {appSubUrl} = window.config;
export async function logoutFromWorker() {
// wait for a while because other requests (eg: logout) may be in the flight
await sleep(5000);
window.location.href = `${appSubUrl}/`;
}