@everymatrix/nuts-inbox-widget 1.94.35 → 1.94.37

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.
@@ -2241,14 +2241,15 @@ class SocketWithUpgrade extends SocketWithoutUpgrade {
2241
2241
  */
2242
2242
  class Socket$1 extends SocketWithUpgrade {
2243
2243
  constructor(uri, opts = {}) {
2244
- const o = typeof uri === "object" ? uri : opts;
2244
+ const isOptionsOnly = typeof uri === "object";
2245
+ const o = isOptionsOnly ? { ...uri } : { ...opts };
2245
2246
  if (!o.transports ||
2246
2247
  (o.transports && typeof o.transports[0] === "string")) {
2247
2248
  o.transports = (o.transports || ["polling", "websocket", "webtransport"])
2248
2249
  .map((transportName) => transports[transportName])
2249
2250
  .filter((t) => !!t);
2250
2251
  }
2251
- super(uri, o);
2252
+ super(isOptionsOnly ? o : uri, o);
2252
2253
  }
2253
2254
  }
2254
2255
 
@@ -2237,14 +2237,15 @@ class SocketWithUpgrade extends SocketWithoutUpgrade {
2237
2237
  */
2238
2238
  class Socket$1 extends SocketWithUpgrade {
2239
2239
  constructor(uri, opts = {}) {
2240
- const o = typeof uri === "object" ? uri : opts;
2240
+ const isOptionsOnly = typeof uri === "object";
2241
+ const o = isOptionsOnly ? { ...uri } : { ...opts };
2241
2242
  if (!o.transports ||
2242
2243
  (o.transports && typeof o.transports[0] === "string")) {
2243
2244
  o.transports = (o.transports || ["polling", "websocket", "webtransport"])
2244
2245
  .map((transportName) => transports[transportName])
2245
2246
  .filter((t) => !!t);
2246
2247
  }
2247
- super(uri, o);
2248
+ super(isOptionsOnly ? o : uri, o);
2248
2249
  }
2249
2250
  }
2250
2251