Skip to content

Commit

Permalink
Remove server://singlefetch origin stub
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed May 8, 2024
1 parent 873c767 commit d16ec89
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/react-router/lib/dom/ssr/single-fetch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,7 @@ export function addRevalidationParam(
export function singleFetchUrl(reqUrl: URL | string) {
let url =
typeof reqUrl === "string"
? new URL(
reqUrl,
typeof window === "undefined"
? // TODO: Trace usage of singleFetchUrl and make sure we don't use it anywhere
// this will make it to a network call.
"server://singlefetch/"
: window.location.origin
)
? new URL(reqUrl, window.location.origin)
: reqUrl;
url.pathname = `${url.pathname === "/" ? "_root" : url.pathname}.data`;
return url;
Expand Down

0 comments on commit d16ec89

Please sign in to comment.