Răsfoiți Sursa

Fixed lint errors

Taichi Masuyama 4 ani în urmă
părinte
comite
53a42a9e89
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      packages/app/src/stores/ui.tsx

+ 2 - 2
packages/app/src/stores/ui.tsx

@@ -269,14 +269,14 @@ export const useCreateModalOpened = (): SWRResponse<boolean, Error> => {
   );
 };
 
-export const useCreateModalPath = (): SWRResponse<string, Error> => {
+export const useCreateModalPath = (): SWRResponse<Nullable<string | undefined>, Error> => {
   const { data: currentPagePath } = useCurrentPagePath();
   const { data: status } = useCreateModalStatus();
 
   return useSWR(
     [currentPagePath, status],
     (currentPagePath, status) => {
-      return status.path || currentPagePath;
+      return status?.path || currentPagePath;
     },
   );
 };