From 6f67814eb45725bc7f3736a2638bad0a7470f17a Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Thu, 3 May 2018 14:12:10 +0200 Subject: js: changed Key class stub -- * src/Key.js: A Key object cannot offer more than basic functionality outside a connection, so it now requires a connection to be present. --- lang/js/src/Keyring.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lang/js/src/Keyring.js') diff --git a/lang/js/src/Keyring.js b/lang/js/src/Keyring.js index d1f4122e..2cf87c24 100644 --- a/lang/js/src/Keyring.js +++ b/lang/js/src/Keyring.js @@ -61,6 +61,7 @@ export class GPGME_Keyring { if (include_secret){ msg.setParameter('with-secret', true); } + let me = this; this.connection.post(msg).then(function(result){ let fpr_list = []; @@ -72,7 +73,7 @@ export class GPGME_Keyring { fpr_list = result.keys; } for (let i=0; i < fpr_list.length; i++){ - let newKey = new GPGME_Key(fpr_list[i]); + let newKey = new GPGME_Key(fpr_list[i], me._connection); if (newKey instanceof GPGME_Key){ resultset.push(newKey); } -- cgit v1.2.3