http-air 1.2.0 → 1.3.1

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.
@@ -11,7 +11,7 @@ const events_1 = require("./events");
11
11
  function resolveConfig(config) {
12
12
  return {
13
13
  url: config.url ?? globalThis?.location?.href ?? 'http://localhost/',
14
- fetchFn: config.fetch ?? globalThis.fetch,
14
+ fetchFn: (config.fetch ?? globalThis.fetch).bind(globalThis),
15
15
  };
16
16
  }
17
17
  /** Serialize items to \n\n-delimited JSON */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "http-air",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "HTTP library for batched RPC calls and real-time server-push over a single endpoint.",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/yosbelms/http-air",