diff options
author | crowlKats <13135287+crowlKats@users.noreply.github.com> | 2021-04-30 17:03:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 11:03:50 -0400 |
commit | 6804b2f8891822f213f2e2a417f1659d2df77e02 (patch) | |
tree | e14bd552006c9f7c234432417f7806bb42e1251c /op_crates/websocket/01_websocket.js | |
parent | fc9c7de94b08049dd04c4ca6016586cdac0dd2ac (diff) |
refactor(websocket): use ZeroCopyBuf to return binary data (#10446)
Diffstat (limited to 'op_crates/websocket/01_websocket.js')
-rw-r--r-- | op_crates/websocket/01_websocket.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/op_crates/websocket/01_websocket.js b/op_crates/websocket/01_websocket.js index 374d174b0..c77af4566 100644 --- a/op_crates/websocket/01_websocket.js +++ b/op_crates/websocket/01_websocket.js @@ -326,9 +326,9 @@ let data; if (this.binaryType === "blob") { - data = new Blob([new Uint8Array(value)]); + data = new Blob([value]); } else { - data = new Uint8Array(value).buffer; + data = value.buffer; } const event = new MessageEvent("message", { |