js: fixed empty operation setter in Message
-- * src/Message.js Messages failed because they were not assigned operations
This commit is contained in:
parent
f45b926816
commit
eb7129f319
@ -44,9 +44,16 @@ export class GPGME_Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set operation (op){
|
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(){
|
get operation(){
|
||||||
return this._msg.op;
|
return this._msg.op;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user