mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
fix: page id could be invalid (#3204)
This commit is contained in:
@@ -239,7 +239,9 @@ rootCurrentWorkspaceIdAtom.onMount = set => {
|
|||||||
if (environment.isBrowser) {
|
if (environment.isBrowser) {
|
||||||
const callback = (url: string) => {
|
const callback = (url: string) => {
|
||||||
const value = url.split('/')[2];
|
const value = url.split('/')[2];
|
||||||
if (value) {
|
if (value === 'all' || value === 'trash' || value === 'shared') {
|
||||||
|
set(null);
|
||||||
|
} else if (value) {
|
||||||
set(value);
|
set(value);
|
||||||
localStorage.setItem('last_workspace_id', value);
|
localStorage.setItem('last_workspace_id', value);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user