diff options
author | Marcos Casagrande <marcoscvp90@gmail.com> | 2020-04-30 22:39:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 16:39:25 -0400 |
commit | 9ded17d722b8da124987cdf16976589a46f2d3f5 (patch) | |
tree | 4b7689c9097cb2081155d9ca65165fe1b5e4829c /std/ws/mod.ts | |
parent | 4297b865f97d3087fa80a5a73d424d2ea183c6d8 (diff) |
BREAKING: reorder std/io/utils copyBytes arguments (#5022)
Diffstat (limited to 'std/ws/mod.ts')
-rw-r--r-- | std/ws/mod.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/std/ws/mod.ts b/std/ws/mod.ts index 2a18cded7..569936706 100644 --- a/std/ws/mod.ts +++ b/std/ws/mod.ts @@ -338,11 +338,11 @@ class WebSocketImpl implements WebSocket { async read(p: Uint8Array): Promise<number | null> { for await (const ev of this.receive()) { if (ev instanceof Uint8Array) { - return copyBytes(p, ev); + return copyBytes(ev, p); } if (typeof ev === "string") { - return copyBytes(p, encode(ev)); + return copyBytes(encode(ev), p); } } |