From 0441c17e1d4c8c4087506e1a3800ac895a0ec5ea Mon Sep 17 00:00:00 2001 From: DiamondThree <857159145@qq.com> Date: Tue, 7 Feb 2023 16:45:58 +0800 Subject: [PATCH] fix: pagelist is null --- packages/app/src/pages/workspace/[workspaceId]/all.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/app/src/pages/workspace/[workspaceId]/all.tsx b/packages/app/src/pages/workspace/[workspaceId]/all.tsx index 1a0ba456d7..5d8eb5b431 100644 --- a/packages/app/src/pages/workspace/[workspaceId]/all.tsx +++ b/packages/app/src/pages/workspace/[workspaceId]/all.tsx @@ -4,9 +4,11 @@ import { PageListHeader } from '@/components/header'; import { ReactElement } from 'react'; import WorkspaceLayout from '@/components/workspace-layout'; import { useTranslation } from '@affine/i18n'; -import { useAppState } from '@/providers/app-state-provider'; +import { PageMeta, useAppState } from '@/providers/app-state-provider'; const All = () => { - const { pageList } = useAppState(); + const { currentWorkspace } = useAppState(); + const pageList = (currentWorkspace?.blocksuiteWorkspace?.meta.pageMetas || + []) as PageMeta[]; const { t } = useTranslation(); return ( <>