We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 624f614 + 2ff34bb commit 6e86021Copy full SHA for 6e86021
examples/chat/index.js
@@ -4,7 +4,7 @@
4
// and so we should scroll the next message into view when received.
5
let expectingMessage = false
6
function dial() {
7
- const protocol = location.protocol === 'https' ? 'wss' : 'ws';
+ const protocol = location.protocol.includes('https') ? 'wss' : 'ws';
8
const conn = new WebSocket(`${protocol}://${location.host}/subscribe`)
9
10
conn.addEventListener('close', ev => {
0 commit comments