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.
@@ -3436,7 +3436,10 @@
3436
3436
  function cloneChange(change, rewriteValues) {
3437
3437
  // clone on demand:
3438
3438
  return Object.assign(Object.assign({}, change), { muts: rewriteValues
3439
- ? change.muts.map((m) => (Object.assign(Object.assign({}, m), { keys: m.keys.slice(), values: m.values.slice() })))
3439
+ ? change.muts.map((m) => {
3440
+ return (m.type === 'insert' || m.type === 'upsert') && m.values
3441
+ ? Object.assign(Object.assign({}, m), { keys: m.keys.slice(), values: m.values.slice() }) : Object.assign(Object.assign({}, m), { keys: m.keys.slice() });
3442
+ })
3440
3443
  : change.muts.map((m) => (Object.assign(Object.assign({}, m), { keys: m.keys.slice() }))) });
3441
3444
  }
3442
3445