Skip to content

Commit 31a82e5

Browse files
committed
Fix types
1 parent 145f6d6 commit 31a82e5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/cli/templates/defaults/app/route-templates/html.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import { sitemap } from "__SITEMAP__";
4444

4545
const customFetch: typeof fetch = (input, init) => {
4646
if (typeof input !== "string") {
47-
return cachedFetch(input, init, projectId);
47+
return cachedFetch(projectId, input, init);
4848
}
4949

5050
if (isLocalResource(input, "sitemap.xml")) {
@@ -54,7 +54,7 @@ const customFetch: typeof fetch = (input, init) => {
5454
return Promise.resolve(response);
5555
}
5656

57-
return cachedFetch(input, init, projectId);
57+
return cachedFetch(projectId, input, init);
5858
};
5959

6060
export const loader = async (arg: LoaderFunctionArgs) => {

packages/cli/templates/react-router/app/route-templates/html.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import { sitemap } from "__SITEMAP__";
4343

4444
const customFetch: typeof fetch = (input, init) => {
4545
if (typeof input !== "string") {
46-
return cachedFetch(input, init, projectId);
46+
return cachedFetch(projectId, input, init);
4747
}
4848

4949
if (isLocalResource(input, "sitemap.xml")) {
@@ -53,7 +53,7 @@ const customFetch: typeof fetch = (input, init) => {
5353
return Promise.resolve(response);
5454
}
5555

56-
return cachedFetch(input, init, projectId);
56+
return cachedFetch(projectId, input, init);
5757
};
5858

5959
export const loader = async (arg: LoaderFunctionArgs) => {

packages/sdk/src/resource-loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ const getCacheKey = async (request: Request) => {
108108
};
109109

110110
export const cachedFetch = async (
111+
namespace: string,
111112
input: RequestInfo | URL,
112-
init: RequestInit,
113-
namespace: string
113+
init?: RequestInit
114114
) => {
115115
if (globalThis.caches) {
116116
const request = new Request(input, init);

0 commit comments

Comments
 (0)