Skip to content

Commit b16fdcf

Browse files
committed
Address comments
1 parent 1493547 commit b16fdcf

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

web/client.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ class _WsLink {
6969

7070
connect() {
7171
return new Promise((resolve, reject) => {
72+
if (!WS) {
73+
return reject(
74+
new Error(
75+
'no WebSocket implementation available; provide a global WebSocket or install the optional `ws` package'
76+
)
77+
);
78+
}
7279
const ws = new WS(this.url);
7380
this._ws = ws;
7481
const onOpen = () => {

0 commit comments

Comments
 (0)