@sera4/essentia 1.1.62 → 1.1.63

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sera4/essentia",
3
- "version": "1.1.62",
3
+ "version": "1.1.63",
4
4
  "description": "A library of utilities for Teleporte Web Services",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/package.tar.gz CHANGED
Binary file
@@ -105,8 +105,8 @@ paperTrail.init = (sequelize, sequelizePackage, optionsArg) => {
105
105
  const destroyOperation = operation === 'destroy';
106
106
  const restoreOperation = operation === 'restore';
107
107
 
108
- let previousVersion = {};
109
- let currentVersion = {};
108
+ let previousVersion = _.cloneDeep(instance._previousDataValues);
109
+ let currentVersion = _.cloneDeep(instance.dataValues);
110
110
  if (!destroyOperation && options.enableCompression) {
111
111
  _.forEach(opt.fields, a => {
112
112
  previousVersion[a] = instance._previousDataValues[a];