mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-25 15:41:31 +03:00
fix: page id could be invalid (#3204)
This commit is contained in:
parent
5dda7d83da
commit
6a2dbc0105
@ -239,7 +239,9 @@ rootCurrentWorkspaceIdAtom.onMount = set => {
|
||||
if (environment.isBrowser) {
|
||||
const callback = (url: string) => {
|
||||
const value = url.split('/')[2];
|
||||
if (value) {
|
||||
if (value === 'all' || value === 'trash' || value === 'shared') {
|
||||
set(null);
|
||||
} else if (value) {
|
||||
set(value);
|
||||
localStorage.setItem('last_workspace_id', value);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user