From 5befa1c9751fe54b5ae87906d7f09772ce9de6ea Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Wed, 25 Apr 2018 11:32:21 +0200 Subject: js: reactivate timeout on connection -- * A timeout of 5 seconds is activated for functions that do not require a pinentry. This definition is written to src/permittedOperations.js * testapplication.js now alerts the proper error codes and messages. * src/Errors.js fixed two typos in error handling --- lang/js/src/Errors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lang/js/src/Errors.js') diff --git a/lang/js/src/Errors.js b/lang/js/src/Errors.js index c49bfe21..04b13e10 100644 --- a/lang/js/src/Errors.js +++ b/lang/js/src/Errors.js @@ -104,12 +104,12 @@ export function GPGMEJS_Error(code = 'GENERIC_ERROR'){ if (errors.hasOwnProperty(code)){ code = 'GENERIC_ERROR'; } - if (error.type === 'error'){ + if (errors.type === 'error'){ return {code: 'code', msg: errors[code].msg }; } - if (error.type === 'warning'){ + if (errors.type === 'warning'){ console.log(code + ': ' + error[code].msg); } return undefined; -- cgit v1.2.3