agnostic-ws
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -60,3 +60,3 @@ import { | ||
this.ws.onmessage = (evt) => { | ||
if (!(evt.data instanceof Buffer) && !(evt.data instanceof Uint8Array)) { | ||
if (!(evt.data instanceof Buffer) && !(evt.data instanceof ArrayBuffer)) { | ||
throw new Error("Expected data to be a BufferLike"); | ||
@@ -67,3 +67,3 @@ } | ||
type: "message", | ||
data: evt.data | ||
data: new Uint8Array(evt.data) | ||
}; | ||
@@ -70,0 +70,0 @@ this.onmessage?.(syntheticEvent); |
{ | ||
"name": "agnostic-ws", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "runtime-agnostic websocekts", |
Sorry, the diff of this file is not supported yet
19187