Skip to content

Commit 12efbd4

Browse files
authoredApr 11, 2025
Merge pull request #229 from takker99:fetch-this
fix(util): Avoid the `this` problem related to `globalThis.fetch`
2 parents 0beeb04 + 11a5ac3 commit 12efbd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const setDefaults = <
8181
options: T,
8282
): Omit<T, "fetch" | "baseURL"> & Required<Pick<T, "fetch" | "baseURL">> => {
8383
const {
84-
fetch = globalThis.fetch,
84+
fetch = (input, init) => globalThis.fetch(input, init),
8585
baseURL = "https://scrapbox.io/",
8686
...rest
8787
} = options;

0 commit comments

Comments
 (0)