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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.7.13",
3
+ "version": "0.7.14",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -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
  }