diff options
author | Maximilian Krambach <[email protected]> | 2018-07-12 09:48:17 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-07-12 09:48:17 +0000 |
commit | 5213a599fea0da64560f935dffbf6b27a39d4850 (patch) | |
tree | a150d343f31ae01b44df560b3e08c3707b9c6d70 /lang/js/src/Keyring.js | |
parent | js: add with-sec-fprs to getKeysArmored (diff) | |
download | gpgme-5213a599fea0da64560f935dffbf6b27a39d4850.tar.gz gpgme-5213a599fea0da64560f935dffbf6b27a39d4850.zip |
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".
Diffstat (limited to 'lang/js/src/Keyring.js')
-rw-r--r-- | lang/js/src/Keyring.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/js/src/Keyring.js b/lang/js/src/Keyring.js index 7a33be98..cefc8123 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){ |