From 9b149f326dd8f97ca335b51061c6aa570691daf1 Mon Sep 17 00:00:00 2001 From: sugoidogo Date: Wed, 29 Jan 2025 17:43:14 +0000 Subject: [PATCH] fix usage of global fetch --- static/WebStorage.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/WebStorage.mjs b/static/WebStorage.mjs index 93caaaf..d5403dd 100644 --- a/static/WebStorage.mjs +++ b/static/WebStorage.mjs @@ -23,7 +23,7 @@ export default class WebStorage { * @param {import('@twurple/auth').AuthProvider} auth_provider used to add the authentication header to requests for web storage * @param {fetch} fetch defaults to `globalThis.fetch`, allows you to further customize fetch behavior via chaining, for example with `fetch-retry` */ - constructor(auth_provider, fetch = globalThis.fetch) { + constructor(auth_provider, fetch = (resource,options)=>{return globalThis.fetch(resource,options)}) { this.#fetch = fetch this.#auth_provider = auth_provider auth_provider.getAccessTokenForUser()