Yuki Takei 2 ani în urmă
părinte
comite
fdcf79f713
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      apps/app/src/server/routes/apiv3/page/create-page.ts

+ 1 - 1
apps/app/src/server/routes/apiv3/page/create-page.ts

@@ -34,7 +34,7 @@ const logger = loggerFactory('growi:routes:apiv3:page:create-page');
 async function generateUntitledPath(parentPath: string, basePathname: string, index = 1): Promise<string> {
   const Page = mongoose.model<IPage>('Page');
 
-  const path = `${normalizePath(parentPath)}${normalizePath(basePathname)}-${index}`;
+  const path = normalizePath(`${normalizePath(parentPath)}/${basePathname}-${index}`);
   if (await Page.exists({ path, isEmpty: false }) != null) {
     return generateUntitledPath(parentPath, basePathname, index + 1);
   }