mqtt 5.6.0 → 5.6.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
@@ -12634,7 +12634,7 @@ var mqtt = (() => {
12634
12634
  // package-json:../../package.json
12635
12635
  var require_package = __commonJS({
12636
12636
  "package-json:../../package.json"(exports5, module) {
12637
- module.exports = { version: "5.6.0" };
12637
+ module.exports = { version: "5.6.2" };
12638
12638
  }
12639
12639
  });
12640
12640
 
@@ -17270,7 +17270,7 @@ var mqtt = (() => {
17270
17270
  var isStandardBrowserEnv = () => {
17271
17271
  var _a;
17272
17272
  if (typeof window !== "undefined") {
17273
- const electronRenderCheck = ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.userAgent) === null || _a === void 0 ? void 0 : _a.toLowerCase().indexOf(" electron/")) > -1;
17273
+ const electronRenderCheck = typeof navigator !== "undefined" && ((_a = navigator.userAgent) === null || _a === void 0 ? void 0 : _a.toLowerCase().indexOf(" electron/")) > -1;
17274
17274
  if (electronRenderCheck && (process_exports === null || process_exports === void 0 ? void 0 : process_exports.versions)) {
17275
17275
  const electronMainCheck = Object.prototype.hasOwnProperty.call(process_exports.versions, "electron");
17276
17276
  return !electronMainCheck;
@@ -21406,7 +21406,13 @@ var mqtt = (() => {
21406
21406
  if (parsed.port != null) {
21407
21407
  parsed.port = Number(parsed.port);
21408
21408
  }
21409
- opts = Object.assign(Object.assign({}, parsed), opts);
21409
+ opts = Object.assign({
21410
+ port: parsed.port,
21411
+ host: parsed.hostname,
21412
+ protocol: parsed.protocol,
21413
+ query: parsed.query,
21414
+ auth: parsed.auth
21415
+ }, opts);
21410
21416
  if (opts.protocol === null) {
21411
21417
  throw new Error("Missing protocol");
21412
21418
  }