Browse Source

refact null check

yuken 4 years ago
parent
commit
152ed267f2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/app/src/stores/page.tsx

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

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