Comparing version 5.10.0 to 5.10.1
@@ -184,6 +184,8 @@ "use strict"; | ||
} | ||
function onMessage(event) { | ||
async function onMessage(event) { | ||
let { data } = event; | ||
if (data instanceof ArrayBuffer) | ||
data = buffer_1.Buffer.from(data); | ||
else if (data instanceof Blob) | ||
data = buffer_1.Buffer.from(await new Response(data).arrayBuffer()); | ||
else | ||
@@ -190,0 +192,0 @@ data = buffer_1.Buffer.from(data, 'utf8'); |
{ | ||
"name": "mqtt", | ||
"description": "A library for the MQTT protocol", | ||
"version": "5.10.0", | ||
"version": "5.10.1", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ "Adam Rudd <adamvrr@gmail.com>", |
@@ -259,5 +259,7 @@ import { StreamBuilder } from '../shared' | ||
*/ | ||
function onMessage(event: MessageEvent) { | ||
async function onMessage(event: MessageEvent) { | ||
let { data } = event | ||
if (data instanceof ArrayBuffer) data = Buffer.from(data) | ||
else if (data instanceof Blob) | ||
data = Buffer.from(await new Response(data).arrayBuffer()) | ||
else data = Buffer.from(data as string, 'utf8') | ||
@@ -264,0 +266,0 @@ if (proxy && !proxy.destroyed) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1860998
32406