@ -37,7 +37,9 @@ class RpcClient {
return async function(...args) {
const result = await origMethod.apply(target.client, args)
if (result.result) {
if (Array.isArray(result)) {
return result
} else if (result.result) {
return result.result
} else if (result.error) {
throw result.error