fixed jsonrpc response 0 not handled properly

This commit is contained in:
Marek Kotewicz committed 2015-02-04 11:23:23 +01:00
1 parent a0cfa3ca21
commit f3e1797153
5 files changed
+19 -4

No files matched your search

+1 -1
View File
@@ -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