diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-02-04 18:23:23 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-02-04 18:23:23 +0800 |
commit | f3e1797153ebf5b19ca3e154cf1240be738e4f08 (patch) | |
tree | cc6379b712a577c73df29f17214f4cbfddecb23a /lib/jsonrpc.js | |
parent | a0cfa3ca21163f26f3f71a0e2ce0a1e617554c72 (diff) | |
download | go-tangerine-f3e1797153ebf5b19ca3e154cf1240be738e4f08.tar go-tangerine-f3e1797153ebf5b19ca3e154cf1240be738e4f08.tar.gz go-tangerine-f3e1797153ebf5b19ca3e154cf1240be738e4f08.tar.bz2 go-tangerine-f3e1797153ebf5b19ca3e154cf1240be738e4f08.tar.lz go-tangerine-f3e1797153ebf5b19ca3e154cf1240be738e4f08.tar.xz go-tangerine-f3e1797153ebf5b19ca3e154cf1240be738e4f08.tar.zst go-tangerine-f3e1797153ebf5b19ca3e154cf1240be738e4f08.zip |
fixed jsonrpc response 0 not handled properly
Diffstat (limited to 'lib/jsonrpc.js')
-rw-r--r-- | lib/jsonrpc.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/jsonrpc.js b/lib/jsonrpc.js index 63afa3229..b2d6922c0 100644 --- a/lib/jsonrpc.js +++ b/lib/jsonrpc.js @@ -45,7 +45,7 @@ var isValidResponse = function (response) { !response.error && response.jsonrpc === '2.0' && typeof response.id === 'number' && - (!!response.result || typeof response.result === 'boolean'); + response.result !== undefined; // only undefined is not valid json object }; /// Should be called to create batch payload object |