socket-function 0.7.13 → 0.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/CallFactory.ts +3 -3
package/package.json
CHANGED
package/src/CallFactory.ts
CHANGED
|
@@ -283,10 +283,10 @@ async function createCallFactory(
|
|
|
283
283
|
|
|
284
284
|
async function onMessage(message: ws.RawData | ws.MessageEvent | string) {
|
|
285
285
|
try {
|
|
286
|
+
if (typeof message === "object" && "data" in message) {
|
|
287
|
+
message = message.data;
|
|
288
|
+
}
|
|
286
289
|
if (!isNode()) {
|
|
287
|
-
if (typeof message === "object" && "data" in message) {
|
|
288
|
-
message = message.data;
|
|
289
|
-
}
|
|
290
290
|
if (message instanceof Blob) {
|
|
291
291
|
message = Buffer.from(await message.arrayBuffer());
|
|
292
292
|
}
|