@xuda.io/runtime-bundle 1.0.245 → 1.0.247

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7645,9 +7645,13 @@ func.utils.set_SYS_GLOBAL_OBJ_WIDGET_INFO = async function (SESSION_ID, docP) {
7645
7645
  };
7646
7646
 
7647
7647
  func.utils.get_last_datasource_no = function (SESSION_ID) {
7648
- const filtered = Object.values(SESSION_OBJ[SESSION_ID].DS_GLB).filter((e) => e.tree_obj.menuType !== 'api');
7649
7648
 
7650
- return filtered?.at?.(-1)?.dssession;
7649
+ if (typeof IS_PROCESS_SERVER !== "undefined") {
7650
+ return Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).at?.(-1)
7651
+ } else {
7652
+ const filtered = Object.values(SESSION_OBJ[SESSION_ID].DS_GLB).filter((e) => e.tree_obj.menuType !== 'api');
7653
+ return filtered?.at?.(-1)?.dsSession;
7654
+ }
7651
7655
  };
7652
7656
  func.events = {};
7653
7657
  func.events.validate = async function (
@@ -7645,9 +7645,13 @@ func.utils.set_SYS_GLOBAL_OBJ_WIDGET_INFO = async function (SESSION_ID, docP) {
7645
7645
  };
7646
7646
 
7647
7647
  func.utils.get_last_datasource_no = function (SESSION_ID) {
7648
- const filtered = Object.values(SESSION_OBJ[SESSION_ID].DS_GLB).filter((e) => e.tree_obj.menuType !== 'api');
7649
7648
 
7650
- return filtered?.at?.(-1)?.dssession;
7649
+ if (typeof IS_PROCESS_SERVER !== "undefined") {
7650
+ return Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).at?.(-1)
7651
+ } else {
7652
+ const filtered = Object.values(SESSION_OBJ[SESSION_ID].DS_GLB).filter((e) => e.tree_obj.menuType !== 'api');
7653
+ return filtered?.at?.(-1)?.dsSession;
7654
+ }
7651
7655
  };
7652
7656
  func.events = {};
7653
7657
  func.events.validate = async function (