Skip to content

Commit

Permalink
Modern build, fixed WebSocket freezing on invalid URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
liyasthomas committed Nov 22, 2020
1 parent 307e434 commit b8d68ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion components/realtime/websocket.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ export default {
}
},
disconnect() {
this.socket.close()
if (this.socket) {
this.socket.close()
}
},
handleError(error) {
this.disconnect()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "nuxt build",
"start": "nuxt start",
"pregenerate": "node build.js",
"generate": "nuxt generate",
"generate": "nuxt generate --modern",
"pretty-quick": "pretty-quick --staged --pattern \"**/*.*(html|js|json|vue)\"",
"test": "jest"
},
Expand Down

0 comments on commit b8d68ee

Please sign in to comment.