yuken 4 лет назад
Родитель
Сommit
b5a629dca2
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/app/src/stores/page.tsx

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

@@ -15,7 +15,7 @@ import { useCurrentPagePath } from './context';
 import { ITermNumberManagerUtil, useTermNumberManager } from './use-static-swr';
 
 
-export const useSWRxPageByPath = (path: string | null, initialData?: IPageHasId): SWRResponse<IPageHasId, Error> => {
+export const useSWRxPageByPath = (path: string | null | undefined, initialData?: IPageHasId): SWRResponse<IPageHasId, Error> => {
   return useSWR(
     path != null ? ['/page', path] : null,
     (endpoint, path) => apiv3Get(endpoint, { path }).then(result => result.data.page),