From 6a2dbc0105eecf678f0dcf4639761a107091ead0 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Thu, 13 Jul 2023 12:18:18 +0800 Subject: [PATCH] fix: page id could be invalid (#3204) --- packages/workspace/src/atom.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/workspace/src/atom.ts b/packages/workspace/src/atom.ts index 5379e36b1d..d32f4f0f3e 100644 --- a/packages/workspace/src/atom.ts +++ b/packages/workspace/src/atom.ts @@ -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 {