@xuda.io/xuda-worker-bundle-min 1.3.834 → 1.3.836
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.
- package/index.js +12 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -49,10 +49,16 @@ func.common.find_ROWID_idx = function (_ds, rowId) {
|
|
|
49
49
|
if (!_ds?.data_feed?.rows) {
|
|
50
50
|
throw new Error("data_feed not found");
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
let index;
|
|
53
|
+
if (rowId === "newRecord") {
|
|
54
|
+
index = glb.newRecord;
|
|
55
|
+
if (!_ds.data_feed.rows[index]) {
|
|
56
|
+
index = -1;
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
// Find the index of the object with the given _ROWID
|
|
60
|
+
index = _ds.data_feed.rows.findIndex((item) => item._ROWID === rowId);
|
|
61
|
+
}
|
|
56
62
|
// If the index is -1, the ROWID was not found, so throw an error
|
|
57
63
|
if (index === -1) {
|
|
58
64
|
throw new Error(`ROWID "${rowId}" not found`);
|
|
@@ -2912,7 +2918,8 @@ func.datasource.render_fields_dataset = async function (
|
|
|
2912
2918
|
func.utils.debug_report(SESSION_ID, "Datasource", err, "E", null, _ds);
|
|
2913
2919
|
}
|
|
2914
2920
|
}
|
|
2915
|
-
_ds.data_feed.rows.push(data_feed);
|
|
2921
|
+
// _ds.data_feed.rows.push(data_feed);
|
|
2922
|
+
_ds.data_feed.rows[0] = data_feed;
|
|
2916
2923
|
};
|
|
2917
2924
|
|
|
2918
2925
|
func.datasource.run_events_functions = async function (
|