@xuda.io/xuda-worker-bundle-min 1.3.835 → 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.
Files changed (2) hide show
  1. package/index.js +10 -4
  2. 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
- // Find the index of the object with the given _ROWID
54
- const index = _ds.data_feed.rows.findIndex((item) => item._ROWID === rowId);
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`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.835",
3
+ "version": "1.3.836",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {