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: open deleted page when open workspace,fixed #1067 (#1068)

Qi121ac152fa7c
diff --git a/apps/web/src/pages/workspace/[workspaceId]/index.tsx b/apps/web/src/pages/workspace/[workspaceId]/index.tsx
index 5d4bc7101b..a67b5b6dd1 100644
--- a/apps/web/src/pages/workspace/[workspaceId]/index.tsx
+++ b/apps/web/src/pages/workspace/[workspaceId]/index.tsx
@@ -19,7 +19,9 @@ const WorkspaceIndex = () => {
return;
}
const savedPageId =
- currentWorkspace?.blocksuiteWorkspace?.meta.pageMetas[0]?.id;
+ currentWorkspace?.blocksuiteWorkspace?.meta.pageMetas.find(
+ meta => !meta.trash
+ )?.id;
if (savedPageId) {
router.replace(`/workspace/${activeWorkspaceId}/${savedPageId}`);
return;