diff --git a/www/file/main.js b/www/file/main.js index 9c76e3618..e6ab7990c 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -180,6 +180,10 @@ define([ var cryptKey = secret.keys && secret.keys.fileKeyStr; var key = Nacl.util.decodeBase64(cryptKey); + if (!u8 || !u8.length) { + return void Cryptpad.errorLoadingScreen(e); + } + FileCrypto.decrypt(u8, key, function (e, data) { if (e) { Cryptpad.removeLoadingScreen();