Skip to content

Commit

Permalink
refactor: force reload if no websocket support
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Jul 15, 2024
1 parent e2bb669 commit a79a50c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ var lastKnownScrollPosition = 0

function connectWebSocket() {
if (!('WebSocket' in window)) {
return
// Force reload if WebSocket is not supported
window.location.reload()
}

const { hostname, port } = window.location
Expand Down

0 comments on commit a79a50c

Please sign in to comment.