Jelajahi Sumber

Fixed lint errors

Taichi Masuyama 4 tahun lalu
induk
melakukan
53a42a9e89
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  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;
     },
   );
 };