From b6c698c8833836971184a0a9c2645a15f8174d37 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 08 五月 2025 16:31:18 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/zshare/actionList/newpagebutton/index.jsx |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
index 3c1c12e..bab817a 100644
--- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx
+++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
@@ -251,14 +251,16 @@
           let _param = { id: Id, tempId: btn.printTemp, pageId: btn.$MenuID || '', dataM: sessionStorage.getItem('dataM')}
           let item = data[0]
 
-          Object.keys(item).forEach(key => {
-            if (/^\$/.test(key)) return
-            if (typeof(item[key]) !== 'string' && typeof(item[key]) !== 'number') return
-            if (typeof(item[key]) === 'string' && item[key].length > 50) return
-            if (['id', 'tempid', 'pageid', 'datam'].includes(key.toLowerCase())) return
-
-            _param[key.toLowerCase()] = item[key]
-          })
+          if (item) {
+            Object.keys(item).forEach(key => {
+              if (/^\$/.test(key)) return
+              if (typeof(item[key]) !== 'string' && typeof(item[key]) !== 'number') return
+              if (typeof(item[key]) === 'string' && item[key].length > 50) return
+              if (['id', 'tempid', 'pageid', 'datam'].includes(key.toLowerCase())) return
+  
+              _param[key.toLowerCase()] = item[key]
+            })
+          }
 
           window.open('#/billprint/' + window.btoa(window.encodeURIComponent(JSON.stringify(_param))))
         }

--
Gitblit v1.8.0