Przeglądaj źródła

fix display for encodeURI

zahmis 5 lat temu
rodzic
commit
cd446eef7b
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/client/js/components/PageDuplicateModal.jsx

+ 2 - 2
src/client/js/components/PageDuplicateModal.jsx

@@ -70,8 +70,8 @@ const PageDuplicateModal = (props) => {
 
     try {
       const res = await appContainer.apiv3Post('/pages/duplicate', { pageId, pageNameInput });
-      const { path } = res.data.page;
-      window.location.href = encodeURI(`${path}?duplicated=${path}`);
+      const { page } = res.data;
+      window.location.href = encodeURI(`${page.path}?duplicated=${path}`);
     }
     catch (err) {
       setErrs(err);