i like safari too

This commit is contained in:
Toshit Chawda 2024-10-11 17:49:19 -07:00
parent da541e7330
commit 642b4a32cc
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
5 changed files with 5 additions and 5 deletions

View file

@ -459,7 +459,7 @@ export function from_entries(entries){
}
async function websocket_connect(url, protocols) {
let wss = new (WebSocketStream ? WebSocketStream : WebSocketStreamPonyfill)(url, { protocols: protocols });
let wss = new (typeof WebSocketStream !== "undefined" ? WebSocketStream : WebSocketStreamPonyfill)(url, { protocols: protocols });
let {readable, writable} = await wss.opened;
return {read: readable, write: writable};
}