*If the rpc call returns no value, default to a true boolean

This commit is contained in:
Derrick Hammer 2022-12-04 07:14:36 -05:00
parent a87660b678
commit 4121e23fd9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 0 deletions

View File

@ -175,6 +175,12 @@ export class RPCServer extends EventEmitter {
let rpcResult: RPCResponse = {};
if (ret === undefined) {
ret = {
data: true,
};
}
if (ret?.data) {
rpcResult = { ...ret };