Shun Miyazawa 3 lat temu
rodzic
commit
28963fcbec

+ 2 - 2
packages/app/src/components/PageRenameModal.tsx

@@ -133,7 +133,7 @@ const PageRenameModal = (): JSX.Element => {
   }, [page, t]);
 
   const checkExistPathsDebounce = useMemo(() => {
-    return debounce(1000, checkExistPaths);
+    return debounce(1000, true, checkExistPaths);
   }, [checkExistPaths]);
 
   const checkIsUsersHomePageDebounce = useMemo(() => {
@@ -141,7 +141,7 @@ const PageRenameModal = (): JSX.Element => {
       setIsMatchedWithUserHomePagePath(isUsersHomePage(pageNameInput));
     };
 
-    return debounce(1000, checkIsPagePathRenameable);
+    return debounce(1000, true, checkIsPagePathRenameable);
   }, [isUsersHomePage, pageNameInput]);
 
   useEffect(() => {

+ 3 - 0
packages/app/src/server/routes/apiv3/page.js

@@ -472,6 +472,9 @@ module.exports = (crowi) => {
   router.get('/exist-paths', loginRequired, validator.exist, apiV3FormValidator, async(req, res) => {
     const { fromPath, toPath } = req.query;
 
+    console.log('fromPath', fromPath);
+    console.log('toPath', toPath);
+
     try {
       const fromPage = await Page.findByPath(fromPath);
       if (fromPage == null) throw new Error('fromPage is Null');