correctly handle JSON-RPC requests with ID=0

This commit is contained in:
Christopher Willis-Ford 2022-04-29 10:58:23 -07:00
parent 75dcefba31
commit 4a15205d75

View file

@ -98,7 +98,7 @@ class JSONRPC {
_handleRequest (json) {
const {method, params, id} = json;
const rawResult = this.didReceiveCall(method, params);
if (id) {
if (id !== null && typeof id !== 'undefined') {
Promise.resolve(rawResult).then(
result => {
this._sendResponse(id, result);