dexie-cloud-addon 4.0.1-beta.41 → 4.0.1-beta.42

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.
@@ -335,7 +335,10 @@
335
335
  }));
336
336
  })));
337
337
  // Sort by time to get a true order of the operations (between tables)
338
- const sorted = flatten(allMutsOnTables).sort((a, b) => a.mut.ts - b.mut.ts);
338
+ const sorted = flatten(allMutsOnTables).sort((a, b) => a.mut.txid === b.mut.txid
339
+ ? a.mut.opNo - b.mut.opNo // Within same transaction, sort by opNo
340
+ : a.mut.ts - b.mut.ts // Different transactions - sort by timestamp when mutation resolved
341
+ );
339
342
  const result = [];
340
343
  let currentEntry = null;
341
344
  let currentTxid = null;
@@ -4443,7 +4446,7 @@
4443
4446
  });
4444
4447
  const syncComplete = new rxjs.Subject();
4445
4448
  dexie.cloud = {
4446
- version: '4.0.1-beta.41',
4449
+ version: '4.0.1-beta.42',
4447
4450
  options: Object.assign({}, DEFAULT_OPTIONS),
4448
4451
  schema: null,
4449
4452
  get currentUserId() {
@@ -4704,7 +4707,7 @@
4704
4707
  });
4705
4708
  }
4706
4709
  }
4707
- dexieCloud.version = '4.0.1-beta.41';
4710
+ dexieCloud.version = '4.0.1-beta.42';
4708
4711
  Dexie__default["default"].Cloud = dexieCloud;
4709
4712
 
4710
4713
  // In case the SW lives for a while, let it reuse already opened connections: