From 6b0e3a71cb691d24e5153cd4d4ec10e174ae4398 Mon Sep 17 00:00:00 2001 From: Yoshie Muranaka Date: Tue, 28 Jul 2020 13:52:54 -0700 Subject: Fix WebSocket error Removing .on() function because it is not a valid method and is causing errors: Uncaught TypeError: ws.on is not a function The onerror event listener is already logging the error. Signed-off-by: Yoshie Muranaka Change-Id: I6ccfa9a3a6beba93668b8c209b59560f4bf7b4bc --- src/store/plugins/WebSocketPlugin.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/store/plugins/WebSocketPlugin.js b/src/store/plugins/WebSocketPlugin.js index cf034f7a..1d420679 100644 --- a/src/store/plugins/WebSocketPlugin.js +++ b/src/store/plugins/WebSocketPlugin.js @@ -28,10 +28,6 @@ const WebSocketPlugin = store => { ws.onopen = () => { ws.send(JSON.stringify(data)); }; - ws.on('error', function(err) { - console.error('error!'); - console.error(err.code); - }); ws.onerror = event => { console.error(event); }; -- cgit v1.2.3