Taichi Masuyama 4 лет назад
Родитель
Сommit
53a42a9e89
1 измененных файлов с 2 добавлено и 2 удалено
  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;
     },
   );
 };