@xuda.io/xuda-worker-bundle-min 1.3.866 → 1.3.867
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 +23 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2644,7 +2644,9 @@ func.datasource.execute = async function (
|
|
|
2644
2644
|
}
|
|
2645
2645
|
|
|
2646
2646
|
const index = _raw_data_rows.findIndex((item) => item.id === rowId);
|
|
2647
|
-
|
|
2647
|
+
if (index === -1) {
|
|
2648
|
+
throw new Error(`ROWID "${rowId}" not found`);
|
|
2649
|
+
}
|
|
2648
2650
|
return index;
|
|
2649
2651
|
};
|
|
2650
2652
|
|
|
@@ -3191,6 +3193,26 @@ func.datasource.run_rows_form = async function (
|
|
|
3191
3193
|
|
|
3192
3194
|
var idx = rowIdxP;
|
|
3193
3195
|
|
|
3196
|
+
const find_ROWID_idx_from_raw_data_arr = function (rowId) {
|
|
3197
|
+
if (!_raw_data_rows) {
|
|
3198
|
+
throw new Error("_raw_data_rows not found");
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
const index = _ds.v.raw_data.rows.findIndex((item) => item.id === rowId);
|
|
3202
|
+
if (index === -1) {
|
|
3203
|
+
throw new Error(`item.id "${rowId}" not found`);
|
|
3204
|
+
}
|
|
3205
|
+
return index;
|
|
3206
|
+
};
|
|
3207
|
+
|
|
3208
|
+
try {
|
|
3209
|
+
idx = find_ROWID_idx_from_raw_data_arr(raw_data_row.id);
|
|
3210
|
+
} catch (e) {
|
|
3211
|
+
_ROWID = "newRecord";
|
|
3212
|
+
_ds.data_feed.rows.push({ _ROWID });
|
|
3213
|
+
idx = func.common.find_ROWID_idx(_ds, _ROWID);
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3194
3216
|
// try {
|
|
3195
3217
|
// if (typeof val !== "undefined") {
|
|
3196
3218
|
// idx = rowIdxP;
|