Improve logout from worker (#30775)

A quick fix for #30756
This commit is contained in:
wxiaoguang authored and GitHub committed 2024-04-30 15:35:42 +00:00
1 parent 564102ce89
commit a988237eb4
3 files changed
+13 -2

No files matched your search

+9
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}/`;
}