fix: logic after delete all workspaces (#2587)

Co-authored-by: JimmFly <yangjinfei001@gmail.com>
This commit is contained in:
Himself65
2023-05-31 12:24:14 +08:00
committed by GitHub
parent 1c7ae04f4f
commit 8dbd354659
11 changed files with 100 additions and 77 deletions

View File

@@ -36,6 +36,9 @@ rootCurrentWorkspaceIdAtom.onMount = set => {
const value = url.split('/')[2];
if (value) {
set(value);
if (typeof window !== 'undefined') {
localStorage.setItem('last_workspace_id', value);
}
} else {
set(null);
}