ryoji-s il y a 2 ans
Parent
commit
0fed200905
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      apps/app/src/components/Common/Dropdown/PageItemControl.tsx

+ 2 - 2
apps/app/src/components/Common/Dropdown/PageItemControl.tsx

@@ -83,11 +83,11 @@ const PageItemControlDropdownMenu = React.memo((props: DropdownMenuProps): JSX.E
 
   // eslint-disable-next-line react-hooks/rules-of-hooks
   const renameItemClickedHandler = useCallback(async() => {
-    if (pageInfo == null || onClickRenameMenuItem == null) {
+    if (onClickRenameMenuItem == null) {
       return;
     }
 
-    if (!pageInfo.isDeletable) {
+    if (!pageInfo?.isDeletable) {
       logger.warn('This page could not be renamed.');
       return;
     }