From 3434393b21da96ac58aad1aa9bf31b4d14c6f7a6 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 7 May 2014 10:24:05 -0300 Subject: [PATCH] rm try catch --- js/models/storage/LocalEncrypted.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/models/storage/LocalEncrypted.js b/js/models/storage/LocalEncrypted.js index fc0570116..42509ab6b 100644 --- a/js/models/storage/LocalEncrypted.js +++ b/js/models/storage/LocalEncrypted.js @@ -34,10 +34,11 @@ Storage.prototype._encryptObj = function(obj) { Storage.prototype._decrypt = function(base64) { var decryptedStr=null; - try { - var decrypted = CryptoJS.AES.decrypt(base64, this._getPassphrase()); + var decrypted = CryptoJS.AES.decrypt(base64, this._getPassphrase()); + + if (decrypted) decryptedStr = decrypted.toString(CryptoJS.enc.Utf8); - } catch (e) {} + return decryptedStr; };