Skip to content

Commit 01679e3

Browse files
committed
switched to global fetch
1 parent b830fea commit 01679e3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mycore-test/js-common",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"exports": {
55
"./i18n": "./src/i18n/index.ts",
66
"./access-key": "./src/access-key/index.ts",

src/utils/http/custom-fetch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface CustomFetchOptions {
5151
*/
5252
export const createCustomFetch = (
5353
options?: CustomFetchOptions
54-
): typeof fetch => {
54+
): typeof globalThis.fetch => {
5555
return async (
5656
_input: RequestInfo | URL,
5757
_init?: RequestInit
@@ -79,6 +79,6 @@ export const createCustomFetch = (
7979
headers: headers,
8080
signal: signal,
8181
});
82-
return await fetch(request, _init);
82+
return await globalThis.fetch(request, _init);
8383
};
8484
};

0 commit comments

Comments
 (0)