dexie-encrypted
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -207,3 +207,9 @@ 'use strict'; | ||
table.hook('updating', function(modifications, primKey, obj) { | ||
return encryptWithRule(table, { ...obj }, newSetting); | ||
const decrypted = decryptWithRule({ ...obj }, newSetting); | ||
const updates = { | ||
...decrypted, | ||
...modifications, | ||
}; | ||
const encrypted = encryptWithRule(table, updates, newSetting); | ||
return encrypted; | ||
}); | ||
@@ -210,0 +216,0 @@ table.hook('reading', function(obj) { |
{ | ||
"name": "dexie-encrypted", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Encryption middleware for Dexie", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
16602
243