Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: page id could be invalid (#3204)

Alex Yang6a2dbc0105ee
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 {