[git] GPGME - branch, javascript-binding, updated. gpgme-1.11.1-74-g5213a59

by Maximilian Krambach cvs at cvs.gnupg.org
Thu Jul 12 11:50:22 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, javascript-binding has been updated
       via  5213a599fea0da64560f935dffbf6b27a39d4850 (commit)
      from  30bb5490466119b66eeac255d71fb7bdc79149fa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5213a599fea0da64560f935dffbf6b27a39d4850
Author: Maximilian Krambach <maximilian.krambach at intevation.de>
Date:   Thu Jul 12 11:48:17 2018 +0200

    js: allow optional Key retrieve pattern to be null
    
    --
    
    * src/Keyring.js: If the optional "pattern" parameter is not to be
      used, but another, following parameter is, null is more of a
      convention in javascript, thus both null and undefined are
      interpreted as "this parameter is not meant to be set".

diff --git a/lang/js/src/Keyring.js b/lang/js/src/Keyring.js
index 7a33be9..cefc812 100644
--- a/lang/js/src/Keyring.js
+++ b/lang/js/src/Keyring.js
@@ -53,7 +53,7 @@ export class GPGME_Keyring {
     getKeys(pattern, prepare_sync=false, search=false){
         return new Promise(function(resolve, reject) {
             let msg = createMessage('keylist');
-            if (pattern !== undefined){
+            if (pattern !== undefined && pattern !== null){
                 msg.setParameter('keys', pattern);
             }
             msg.setParameter('sigs', true);
@@ -136,7 +136,7 @@ export class GPGME_Keyring {
             if (with_secret_fpr === true) {
                 msg.setParameter('with-sec-fprs', true);
             }
-            if (pattern !== undefined){
+            if (pattern !== undefined && pattern !== null){
                 msg.setParameter('keys', pattern);
             }
             msg.post().then(function(answer){

-----------------------------------------------------------------------

Summary of changes:
 lang/js/src/Keyring.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list