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

[email protected] (by Maximilian Krambach)
Newsgroups gmane.comp.encryption.gpg.cvs
Message-ID <[email protected]>
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 <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.