@superlinked/sie-sdk 0.4.0 → 0.4.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/index.cjs CHANGED
@@ -271,7 +271,7 @@ function packMessage(data) {
271
271
  return msgpack.encode(data, { extensionCodec });
272
272
  }
273
273
  function isNumpyArrayMap(obj) {
274
- if (typeof obj !== "object" || obj === null) {
274
+ if (obj === null || typeof obj !== "object") {
275
275
  return false;
276
276
  }
277
277
  const map = obj;
@@ -798,7 +798,7 @@ function extractDataPayload(block) {
798
798
  }
799
799
 
800
800
  // src/version.ts
801
- var SDK_VERSION = "0.4.0";
801
+ var SDK_VERSION = "0.4.2";
802
802
 
803
803
  // src/client.ts
804
804
  function sleep2(ms) {
@@ -2093,10 +2093,11 @@ var SIEClient = class {
2093
2093
  createWebSocket(url) {
2094
2094
  const headers = this.apiKey ? { Authorization: `Bearer ${this.apiKey}` } : void 0;
2095
2095
  try {
2096
- if (headers) {
2097
- return new WebSocket(url, [], { headers });
2096
+ if (!headers) {
2097
+ return new WebSocket(url);
2098
2098
  }
2099
- return new WebSocket(url);
2099
+ const args = [url, [], { headers }];
2100
+ return Reflect.construct(WebSocket, args);
2100
2101
  } catch (error) {
2101
2102
  if (headers) {
2102
2103
  throw new SIEConnectionError(