Skip to content

Commit

Permalink
fix(browser): ensure proxy is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Aug 1, 2024
1 parent b5cc835 commit ffc9805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/connect/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ const browserStreamBuilder: StreamBuilder = (client, opts) => {
let { data } = event
if (data instanceof ArrayBuffer) data = Buffer.from(data)
else data = Buffer.from(data as string, 'utf8')
if (!proxy?.destroyed) {
if (proxy && !proxy.destroyed) {
proxy.push(data)
}
}
Expand Down

0 comments on commit ffc9805

Please sign in to comment.