diff options
Diffstat (limited to '')
-rw-r--r-- | lang/js/src/Errors.js | 4 |
1 files changed, 2 insertions, 2 deletions
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; |