@xuda.io/xuda-worker-bundle-min 1.3.363 → 1.3.364

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 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -378,13 +378,16 @@ func.common.db = async function (
378
378
  const json = await perform_rpi_request(serviceP);
379
379
  if (json.opt) {
380
380
  try {
381
- await db.put({
382
- _id: rep_id,
383
- selector: json.opt.selector,
384
- stat: 1,
385
- ts: Date.now(),
386
- docType: "rep_request",
387
- });
381
+ try {
382
+ await db.get(rep_id);
383
+ await db.put({
384
+ _id: rep_id,
385
+ selector: json.opt.selector,
386
+ stat: 1,
387
+ ts: Date.now(),
388
+ docType: "rep_request",
389
+ });
390
+ } catch (err) {}
388
391
  func.db.pouch.set_db_replication_from_server(SESSION_ID, rep_id);
389
392
  } catch (err) {}
390
393
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.363",
3
+ "version": "1.3.364",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {