From 8556f5edbc986113ded0ad04e4b8be9d520b66d1 Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 14 Aug 2017 16:57:45 +0900 Subject: [PATCH] bug fix --- src/ts/@overflow/commons/websocket/WebSocketRPC.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ts/@overflow/commons/websocket/WebSocketRPC.ts b/src/ts/@overflow/commons/websocket/WebSocketRPC.ts index 5edd904..3aad65e 100644 --- a/src/ts/@overflow/commons/websocket/WebSocketRPC.ts +++ b/src/ts/@overflow/commons/websocket/WebSocketRPC.ts @@ -131,8 +131,12 @@ export default class WebSocketRPC { private onResponseHandler(response: Response): void { const requestID = response.ID; - const error = response.Error; - const result = JSON.parse(response.Result); + let error = response.Error; + let result; + + if (undefined !== response.Result) { + result = JSON.parse(response.Result); + } if (this.requestQueue.has(requestID)) { let promise = this.requestQueue.get(requestID);