Procházet zdrojové kódy

Revert "Do not fetch if pageId is undefined"

This reverts commit c66e6c3fb8a6853e1bdee30de16f27716f43c93b.
Shun Miyazawa před 3 roky
rodič
revize
bef9b342fd
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      packages/app/src/stores/page.tsx

+ 2 - 1
packages/app/src/stores/page.tsx

@@ -81,8 +81,9 @@ export const useSWRxCurrentPage = (
 
 
 export const useSWRxTagsInfo = (pageId: Nullable<string>): SWRResponse<IPageTagsInfo | undefined, Error> => {
+
   const endpoint = `/pages.getPageTag?pageId=${pageId}`;
-  const key = pageId != null ? [endpoint, pageId] : null;
+  const key = [endpoint, pageId];
 
   const fetcher = async(endpoint: string, pageId: Nullable<string>) => {
     let tags: string[] = [];