js: fix syntax inside Keyring methods
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Thu, 23 Aug 2018 15:55:35 +0000 (17:55 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Thu, 23 Aug 2018 15:58:22 +0000 (17:58 +0200)
--

* recent changes in parameter calling led to a forgotten internal call
  in getDefaultKey using old syntax (and failing in case a default key
  is configured)

lang/js/src/Keyring.js

index 5902708..2b57e63 100644 (file)
@@ -185,7 +185,8 @@ export class GPGME_Keyring {
                     && resp.option.value.length === 1
                     && resp.option.value[0].hasOwnProperty('string')
                     && typeof (resp.option.value[0].string) === 'string'){
-                    me.getKeys(resp.option.value[0].string, true).then(
+                    me.getKeys({ pattern: resp.option.value[0].string,
+                        prepare_sync: true }).then(
                         function (keys){
                             if (keys.length === 1){
                                 resolve(keys[0]);