From eec686b3c4907a9a83cfdcc9a9b4f8772eda4d9f Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 20 Oct 2021 11:01:44 +0700 Subject: all: check for response ID 0 to before call onBroadcast A response is defined as broadcast from server when the ID is 0. --- websocket_client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket_client.ts b/websocket_client.ts index 62d11fc..3d68cd5 100644 --- a/websocket_client.ts +++ b/websocket_client.ts @@ -147,7 +147,7 @@ export class WuiWebSocketClient { } } - if (this.opts.onBroadcast) { + if (this.opts.onBroadcast && res.id == 0) { this.opts.onBroadcast(res) } } -- cgit v1.3