diff --git a/lang/js/BrowserTestExtension/tests/longRunningTests.js b/lang/js/BrowserTestExtension/tests/longRunningTests.js index 1d710e31..f28a6e78 100644 --- a/lang/js/BrowserTestExtension/tests/longRunningTests.js +++ b/lang/js/BrowserTestExtension/tests/longRunningTests.js @@ -34,9 +34,9 @@ describe('Long running Encryption/Decryption', function () { }); }); - for (let i=0; i < 101; i++) { + for (let i=1; i < 101; i++) { it('Successful encrypt/decrypt completely random data ' - + (i+1) + '/100', function (done) { + + (i) + '/100', function (done) { const data = bigString(2*1024*1024); context.encrypt({ data: data, publicKeys: good_fpr }) .then(function (answer){ diff --git a/lang/js/src/Helpers.js b/lang/js/src/Helpers.js index f370fe60..0b418529 100644 --- a/lang/js/src/Helpers.js +++ b/lang/js/src/Helpers.js @@ -50,7 +50,7 @@ export function toKeyIdArray (input){ } } else if (typeof (input[i]) === 'object'){ let fpr = ''; - if (input[i].hasOwnProperty('fingerprint')){ + if (input[i].fingerprint !== undefined){ fpr = input[i].fingerprint; } else if (input[i].hasOwnProperty('primaryKey') && input[i].primaryKey.hasOwnProperty('getFingerprint')){