Ver Fonte

add judg

Shun Miyazawa há 3 anos atrás
pai
commit
12d2a0e1d8
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      packages/app/src/components/PageRenameModal.tsx

+ 3 - 1
packages/app/src/components/PageRenameModal.tsx

@@ -127,7 +127,9 @@ const PageRenameModal = (): JSX.Element => {
     try {
       const res = await apiv3Get<{ existPaths: string[]}>('/page/exist-paths', { fromPath, toPath });
       const { existPaths } = res.data;
-      setCanRename(true);
+      if (existPaths.length === 0) {
+        setCanRename(true);
+      }
       setExistingPaths(existPaths);
     }
     catch (err) {