bug fix
This commit is contained in:
parent
9d43ba870b
commit
6012209413
|
@ -132,7 +132,7 @@ export default class WebSocketRPC {
|
|||
private onResponseHandler(response: Response<ID_TYPE>): void {
|
||||
const requestID = response.ID;
|
||||
const error = response.Error;
|
||||
const result = JSON.parse(response.Result);
|
||||
const result = response.Result;
|
||||
|
||||
if (this.requestQueue.has(requestID)) {
|
||||
let promise = this.requestQueue.get(requestID);
|
||||
|
|
|
@ -18,7 +18,7 @@ export class Response<ID> extends Header {
|
|||
* get ID
|
||||
*/
|
||||
public get ID(): ID {
|
||||
return this.result;
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,6 +41,7 @@ export class Response<ID> extends Header {
|
|||
throw new Error(`Response must include ID`);
|
||||
}
|
||||
let res = new Response(id);
|
||||
res.Protocol = response.protocol;
|
||||
res.result = response.result;
|
||||
res.error = response.error;
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue
Block a user