diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-07-28 23:52:54 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-07-29 00:00:59 +0300 |
commit | 6b0e3a71cb691d24e5153cd4d4ec10e174ae4398 (patch) | |
tree | 603e849b2a4ba909374a91cdc512d2fa27afda0a /src/store/plugins/WebSocketPlugin.js | |
parent | 254b960f4e1d8e0713da3a05152eab2e07a2eb26 (diff) | |
download | webui-vue-6b0e3a71cb691d24e5153cd4d4ec10e174ae4398.tar.xz |
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 <yoshiemuranaka@gmail.com>
Change-Id: I6ccfa9a3a6beba93668b8c209b59560f4bf7b4bc
Diffstat (limited to 'src/store/plugins/WebSocketPlugin.js')
-rw-r--r-- | src/store/plugins/WebSocketPlugin.js | 4 |
1 files changed, 0 insertions, 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); }; |