From 2d477ba69855d32aa3bc8c798ae0a057d1cc7f11 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Fri, 3 Jun 2022 21:09:08 +0800 Subject: [PATCH] client: fix hook dep --- packages/client/src/components/document/reader/public/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/document/reader/public/index.tsx b/packages/client/src/components/document/reader/public/index.tsx index f935bb7..2e04227 100644 --- a/packages/client/src/components/document/reader/public/index.tsx +++ b/packages/client/src/components/document/reader/public/index.tsx @@ -69,7 +69,7 @@ export const DocumentPublicReader: React.FC = ({ documentId, hideLogo = pathname: currentWikiId ? '/share/document/[documentId]' : '/share/wiki/[wikiId]/document/[documentId]', query: currentWikiId ? { documentId } : { wikiId: data.wikiId, documentId }, }); - }, [currentWikiId, documentId, data.wikiId]); + }, [currentWikiId, documentId, data]); const content = useMemo(() => { if (error) {