@qed-proof/sdk 0.1.3 → 0.1.4

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.js CHANGED
@@ -1721,10 +1721,11 @@ var QedProof = class {
1721
1721
  constructor(options = {}) {
1722
1722
  this.apiKey = options.apiKey;
1723
1723
  this.baseUrl = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
1724
- this.fetchImpl = options.fetch ?? globalThis.fetch;
1725
- if (!this.fetchImpl) {
1724
+ const f = options.fetch ?? globalThis.fetch;
1725
+ if (!f) {
1726
1726
  throw new Error("QedProof: no fetch implementation available; pass { fetch } explicitly");
1727
1727
  }
1728
+ this.fetchImpl = (input, init) => f(input, init);
1728
1729
  }
1729
1730
  async request(method, path, { auth = true, body, text = false } = {}) {
1730
1731
  const headers = { accept: "application/json" };