Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IamJignesh committed Aug 28, 2024
1 parent 7e34e30 commit 02f4c99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/connect/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,10 @@ const browserStreamBuilder: StreamBuilder = (client, opts) => {
* https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/message_event
*/
async function onMessage(event: MessageEvent) {
let { data } = event;
let { data } = event
if (data instanceof ArrayBuffer) data = Buffer.from(data)
else if (data instanceof Blob) data = Buffer.from(await new Response(data).arrayBuffer())
else if (data instanceof Blob)
data = Buffer.from(await new Response(data).arrayBuffer())
else data = Buffer.from(data as string, 'utf8')
if (proxy && !proxy.destroyed) {
proxy.push(data)
Expand Down

0 comments on commit 02f4c99

Please sign in to comment.