aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-04-27 08:21:13 +0000
committerMaximilian Krambach <[email protected]>2018-04-27 08:21:13 +0000
commiteb7129f3196ae4f0807ceba0c1fc9e818ea6cd22 (patch)
treedcbd7f1e7809aace23a0dba4e09b761090b25b24 /lang/js
parentjs: fixed wrong paths in DemoExtension (diff)
downloadgpgme-eb7129f3196ae4f0807ceba0c1fc9e818ea6cd22.tar.gz
gpgme-eb7129f3196ae4f0807ceba0c1fc9e818ea6cd22.zip
js: fixed empty operation setter in Message
-- * src/Message.js Messages failed because they were not assigned operations
Diffstat (limited to '')
-rw-r--r--lang/js/src/Message.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/lang/js/src/Message.js b/lang/js/src/Message.js
index 9e7a8835..95d043ba 100644
--- a/lang/js/src/Message.js
+++ b/lang/js/src/Message.js
@@ -44,9 +44,16 @@ export class GPGME_Message {
}
set operation (op){
-
-
+ if (typeof(op) === "string"){
+ if (!this._msg){
+ this._msg = {};
+ }
+ if (!this._msg.op & permittedOperations.hasOwnProperty(op)){
+ this._msg.op = op;
+ }
+ }
}
+
get operation(){
return this._msg.op;
}