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.
@@ -3182,7 +3182,10 @@ function encodeIdsForServer(schema, currentUser, changes) {
3182
3182
  function cloneChange(change, rewriteValues) {
3183
3183
  // clone on demand:
3184
3184
  return Object.assign(Object.assign({}, change), { muts: rewriteValues
3185
- ? change.muts.map((m) => (Object.assign(Object.assign({}, m), { keys: m.keys.slice(), values: m.values.slice() })))
3185
+ ? change.muts.map((m) => {
3186
+ return (m.type === 'insert' || m.type === 'upsert') && m.values
3187
+ ? Object.assign(Object.assign({}, m), { keys: m.keys.slice(), values: m.values.slice() }) : Object.assign(Object.assign({}, m), { keys: m.keys.slice() });
3188
+ })
3186
3189
  : change.muts.map((m) => (Object.assign(Object.assign({}, m), { keys: m.keys.slice() }))) });
3187
3190
  }
3188
3191
 
@@ -6013,7 +6016,7 @@ function dexieCloud(dexie) {
6013
6016
  });
6014
6017
  const syncComplete = new Subject();
6015
6018
  dexie.cloud = {
6016
- version: '4.0.1-beta.36',
6019
+ version: '4.0.1-beta.37',
6017
6020
  options: Object.assign({}, DEFAULT_OPTIONS),
6018
6021
  schema: null,
6019
6022
  get currentUserId() {
@@ -6274,7 +6277,7 @@ function dexieCloud(dexie) {
6274
6277
  });
6275
6278
  }
6276
6279
  }
6277
- dexieCloud.version = '4.0.1-beta.36';
6280
+ dexieCloud.version = '4.0.1-beta.37';
6278
6281
  Dexie.Cloud = dexieCloud;
6279
6282
 
6280
6283
  // In case the SW lives for a while, let it reuse already opened connections: