Skip to content

Commit

Permalink
Disable ws detection (Does not work with nuxt.js)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm-cita committed Jan 20, 2020
1 parent 3a978f8 commit 48695e9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/WebSocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@

let WebSocket

try {
WebSocket = require('ws')
} catch (e) {
// this is browser
window.WebSocket.prototype.removeAllListeners = () => { }
}
window.WebSocket.prototype.removeAllListeners = () => { }

module.exports = WebSocket || window.WebSocket

0 comments on commit 48695e9

Please sign in to comment.