mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Merge pull request #3619 from cwillisf/rpc-allow-id-0
correctly handle JSON-RPC requests with ID=0
This commit is contained in:
commit
0e165275e0
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ class JSONRPC {
|
||||||
_handleRequest (json) {
|
_handleRequest (json) {
|
||||||
const {method, params, id} = json;
|
const {method, params, id} = json;
|
||||||
const rawResult = this.didReceiveCall(method, params);
|
const rawResult = this.didReceiveCall(method, params);
|
||||||
if (id) {
|
if (id !== null && typeof id !== 'undefined') {
|
||||||
Promise.resolve(rawResult).then(
|
Promise.resolve(rawResult).then(
|
||||||
result => {
|
result => {
|
||||||
this._sendResponse(id, result);
|
this._sendResponse(id, result);
|
||||||
|
|
Loading…
Reference in a new issue