@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.
- package/index.js +10 -4
- 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`);
|