mqtt 5.10.0 → 5.10.2

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/dist/mqtt.js CHANGED
@@ -12625,7 +12625,7 @@ var mqtt = (() => {
12625
12625
  // package-json:../../package.json
12626
12626
  var require_package = __commonJS({
12627
12627
  "package-json:../../package.json"(exports5, module) {
12628
- module.exports = { version: "5.10.0" };
12628
+ module.exports = { version: "5.10.2" };
12629
12629
  }
12630
12630
  });
12631
12631
 
@@ -20956,10 +20956,12 @@ var mqtt = (() => {
20956
20956
  error["event"] = err;
20957
20957
  stream.destroy(error);
20958
20958
  }
20959
- function onMessage(event) {
20959
+ async function onMessage(event) {
20960
20960
  let { data } = event;
20961
20961
  if (data instanceof ArrayBuffer)
20962
20962
  data = buffer_1.Buffer.from(data);
20963
+ else if (data instanceof Blob)
20964
+ data = buffer_1.Buffer.from(await new Response(data).arrayBuffer());
20963
20965
  else
20964
20966
  data = buffer_1.Buffer.from(data, "utf8");
20965
20967
  if (proxy && !proxy.destroyed) {