diff --git a/src/services/protected_session.js b/src/services/protected_session.js index ebf4b998f..f224ed6f1 100644 --- a/src/services/protected_session.js +++ b/src/services/protected_session.js @@ -43,10 +43,18 @@ function decryptNotes(notes) { } function encrypt(plainText) { + if (plainText === null) { + return null; + } + return dataEncryptionService.encrypt(getDataKey(), plainText); } function decrypt(cipherText) { + if (cipherText === null) { + return null; + } + return dataEncryptionService.decrypt(getDataKey(), cipherText); }