liwei 1 year ago
parent
commit
41fa89e1f6

+ 1 - 1
src/modules/editor/components/Viewport/Header/PreviewDesignModal.tsx

@@ -29,7 +29,7 @@ export default defineComponent({
 
     function getPageH() {
       const rootPage = controls.pageCtrl.rootPage;
-      const pageH = rootPage?.layout?.size[1] || Design_Page_Size[1];
+      const pageH = rootPage?.layout.size?.[1] || Design_Page_Size[1];
       return helper.designToNaturalSize(pageH, {
         adaptiveH: true,
       });

+ 1 - 1
src/pages/h5/share/Promotion.tsx

@@ -53,7 +53,7 @@ export default defineComponent(() => {
 
   function getPageH() {
     const rootPage = editor.controls.pageCtrl.rootPage;
-    const pageH = rootPage?.layout?.size[1] || Design_Page_Size[1];
+    const pageH = rootPage?.layout.size?.[1] || Design_Page_Size[1];
     return editor.helper.designToNaturalSize(pageH, {
       adaptiveH: true,
     });