Pass empty params as null (#115)

This commit is contained in:
Jaco Greeff
2018-07-22 12:12:37 +02:00
committed by GitHub
parent 6d8ab1b4b9
commit b60a3f3cc0
6 changed files with 66 additions and 64 deletions
@@ -10,6 +10,8 @@ export default function encodeObject (self: RpcCoderState, method: string, param
id: ++self.id,
jsonrpc: '2.0',
method,
params
params: params && params.length
? params
: null
};
}