Shun Miyazawa 4 lat temu
rodzic
commit
e8df1d055d

+ 3 - 3
packages/app/src/components/Sidebar/PageTree/Item.tsx

@@ -265,18 +265,18 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
     const parentPath = pathUtils.addTrailingSlash(page.path as string);
     const parentPath = pathUtils.addTrailingSlash(page.path as string);
     const newPagePath = `${parentPath}${inputText}`;
     const newPagePath = `${parentPath}${inputText}`;
     const isCreatable = pagePathUtils.isCreatablePage(newPagePath);
     const isCreatable = pagePathUtils.isCreatablePage(newPagePath);
-    let body = '';
+    let initBody = '';
 
 
     const isEnabledAttachTitleHeader = props.appContainer.getConfig().isEnabledAttachTitleHeader;
     const isEnabledAttachTitleHeader = props.appContainer.getConfig().isEnabledAttachTitleHeader;
     if (isEnabledAttachTitleHeader) {
     if (isEnabledAttachTitleHeader) {
-      body = pathUtils.attachTitleHeader(newPagePath);
+      initBody = pathUtils.attachTitleHeader(newPagePath);
     }
     }
 
 
     if (isCreatable) {
     if (isCreatable) {
       try {
       try {
         await apiv3Post('/pages/', {
         await apiv3Post('/pages/', {
           path: newPagePath,
           path: newPagePath,
-          body,
+          body: initBody,
           grant: page.grant,
           grant: page.grant,
           grantUserGroupId: page.grantedGroup,
           grantUserGroupId: page.grantedGroup,
           createFromPageTree: true,
           createFromPageTree: true,