From c67018997edd62a1720836afb499f55feddc96b6 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Tue, 20 Dec 2022 13:09:19 +0800 Subject: [PATCH] fix: quick search switch warning --- packages/app/src/components/quick-search/config.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/app/src/components/quick-search/config.ts b/packages/app/src/components/quick-search/config.ts index efcd072a47..a883c0ed66 100644 --- a/packages/app/src/components/quick-search/config.ts +++ b/packages/app/src/components/quick-search/config.ts @@ -4,17 +4,23 @@ export const config = (currentWorkspaceId: string) => { const List = [ { title: 'All pages', - href: `/workspace/${currentWorkspaceId}/all`, + href: `/workspace/${ + currentWorkspaceId ? currentWorkspaceId : 'undefined' + }/all`, icon: AllPagesIcon, }, { title: 'Favourites', - href: `/workspace/${currentWorkspaceId}/favorite`, + href: `/workspace/${ + currentWorkspaceId ? currentWorkspaceId : 'undefined' + }/favorite`, icon: FavouritesIcon, }, { title: 'Trash', - href: `/workspace/${currentWorkspaceId}/trash`, + href: `/workspace/${ + currentWorkspaceId ? currentWorkspaceId : 'undefined' + }/trash`, icon: TrashIcon, }, ];