@saltify/milky-node-sdk 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -78,7 +78,7 @@ var MilkyClient = class {
78
78
  }
79
79
  });
80
80
  sse.connect();
81
- this.disposeCore = sse.close;
81
+ this.disposeCore = sse.close.bind(sse);
82
82
  }
83
83
  createWebsocket() {
84
84
  if (!globalThis.WebSocket) throw new Error("WebSocket is not supported in this environment.");
@@ -91,7 +91,7 @@ var MilkyClient = class {
91
91
  const data = JSON.parse(event.data);
92
92
  this.eventEmitter.emit(data.event_type, data);
93
93
  });
94
- this.disposeCore = ws.close;
94
+ this.disposeCore = ws.close.bind(ws);
95
95
  }
96
96
  /**
97
97
  * Release the WebSocket / Server Sent Event connection.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saltify/milky-node-sdk",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "Node.js SDK for Milky protocol",
6
6
  "main": "dist/index.js",
7
7
  "typings": "dist/index.d.ts",