js: decrypt callback is_mime fix
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Fri, 17 Aug 2018 15:44:06 +0000 (17:44 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Fri, 17 Aug 2018 15:44:06 +0000 (17:44 +0200)
--

* src/gpgmejs: is_mime should report its' counterpart. Also,
  file_name is not optional in specification. We'll send null if
  there is no file_name

lang/js/src/gpgmejs.js

index 9154979..1816436 100644 (file)
@@ -193,9 +193,11 @@ export class GpgME {
                 msg.post().then(function(result){
                     let _result = {data: result.data};
                     _result.base64 = result.base64 ? true: false;
-                    _result.is_mime = result.mime ? true: false;
+                    _result.is_mime = result.is_mime ? true: false;
                     if (result.file_name){
                         _result.file_name = result.file_name;
+                    } else {
+                        _result.file_name = null;
                     }
                     if (
                         result.hasOwnProperty('signatures') &&