Skip to content

Commit d16ec89

Browse files
committed
Remove server://singlefetch origin stub
1 parent 873c767 commit d16ec89

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/react-router/lib/dom/ssr/single-fetch.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,7 @@ export function addRevalidationParam(
286286
export function singleFetchUrl(reqUrl: URL | string) {
287287
let url =
288288
typeof reqUrl === "string"
289-
? new URL(
290-
reqUrl,
291-
typeof window === "undefined"
292-
? // TODO: Trace usage of singleFetchUrl and make sure we don't use it anywhere
293-
// this will make it to a network call.
294-
"server://singlefetch/"
295-
: window.location.origin
296-
)
289+
? new URL(reqUrl, window.location.origin)
297290
: reqUrl;
298291
url.pathname = `${url.pathname === "/" ? "_root" : url.pathname}.data`;
299292
return url;

0 commit comments

Comments
 (0)