fix: open deleted page when open workspace,fixed #1067 (#1068)

This commit is contained in:
Qi 2023-02-17 00:58:24 +08:00 committed by GitHub
parent 50352e0f82
commit 121ac152fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;