dexie-cloud-addon 4.0.1-beta.36 → 4.0.1-beta.37

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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.0.1-beta.36, Mon Apr 17 2023
11
+ * Version 4.0.1-beta.37, Mon Apr 17 2023
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -3429,7 +3429,10 @@ function encodeIdsForServer(schema, currentUser, changes) {
3429
3429
  function cloneChange(change, rewriteValues) {
3430
3430
  // clone on demand:
3431
3431
  return Object.assign(Object.assign({}, change), { muts: rewriteValues
3432
- ? change.muts.map((m) => (Object.assign(Object.assign({}, m), { keys: m.keys.slice(), values: m.values.slice() })))
3432
+ ? change.muts.map((m) => {
3433
+ return (m.type === 'insert' || m.type === 'upsert') && m.values
3434
+ ? Object.assign(Object.assign({}, m), { keys: m.keys.slice(), values: m.values.slice() }) : Object.assign(Object.assign({}, m), { keys: m.keys.slice() });
3435
+ })
3433
3436
  : change.muts.map((m) => (Object.assign(Object.assign({}, m), { keys: m.keys.slice() }))) });
3434
3437
  }
3435
3438
 
@@ -6038,7 +6041,7 @@ function dexieCloud(dexie) {
6038
6041
  });
6039
6042
  const syncComplete = new Subject();
6040
6043
  dexie.cloud = {
6041
- version: '4.0.1-beta.36',
6044
+ version: '4.0.1-beta.37',
6042
6045
  options: Object.assign({}, DEFAULT_OPTIONS),
6043
6046
  schema: null,
6044
6047
  get currentUserId() {
@@ -6299,7 +6302,7 @@ function dexieCloud(dexie) {
6299
6302
  });
6300
6303
  }
6301
6304
  }
6302
- dexieCloud.version = '4.0.1-beta.36';
6305
+ dexieCloud.version = '4.0.1-beta.37';
6303
6306
  Dexie.Cloud = dexieCloud;
6304
6307
 
6305
6308
  export { dexieCloud as default, dexieCloud, getTiedObjectId, getTiedRealmId };