From 6313a2de9ee84a9321292f775e4d6c790486d3dc Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Tue, 31 Jul 2018 17:35:52 +0200 Subject: [PATCH] js: fix confusion about loop in last commit -- * The aim is to iterate through the results of the first request (all keys), and then add the propert 'hasSecret' to those that are in the second request (secret Keysring) as well. I messed this up in a recent change, and it escaped testing. --- lang/js/src/Keyring.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lang/js/src/Keyring.js b/lang/js/src/Keyring.js index 8715a47d..d25216c6 100644 --- a/lang/js/src/Keyring.js +++ b/lang/js/src/Keyring.js @@ -79,9 +79,8 @@ export class GPGME_Keyring { }; } secondrequest().then(function(answer) { - for (let i=0; i < answer.keys.length; i++){ + for (let i=0; i < result.keys.length; i++){ if (prepare_sync === true){ - result.keys[i].hasSecret = undefined; if (answer && answer.keys) { for (let j=0; j < answer.keys.length; j++ ){