Skip to content

Commit 6b0e3a7

Browse files
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 <[email protected]> Change-Id: I6ccfa9a3a6beba93668b8c209b59560f4bf7b4bc
1 parent 254b960 commit 6b0e3a7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/store/plugins/WebSocketPlugin.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ const WebSocketPlugin = store => {
2828
ws.onopen = () => {
2929
ws.send(JSON.stringify(data));
3030
};
31-
ws.on('error', function(err) {
32-
console.error('error!');
33-
console.error(err.code);
34-
});
3531
ws.onerror = event => {
3632
console.error(event);
3733
};

0 commit comments

Comments
 (0)