Skip to content

Commit da3d10e

Browse files
authored
Revert "fix: url pattern build to handle optional paths (#898)" (#910)
This reverts commit de60a5e.
1 parent 138d1ef commit da3d10e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runtime/features/render.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ export const render = async <TAppManifest extends AppManifest = AppManifest>(
4949

5050
const url = new URL(href, req.url);
5151
const request = new Request(url, req);
52-
const urlPathTemplate = new URLPattern(pathTemplate, "http://localhost:8000");
52+
const urlPathTemplate = new URL(pathTemplate, "http://localhost:8000");
5353
const params = new URLPattern({
5454
pathname: urlPathTemplate.pathname,
55-
search: urlPathTemplate.search,
55+
...(urlPathTemplate.search ? { search: urlPathTemplate.search } : {}),
5656
}).exec(url);
5757

5858
const resolvables = await state.resolve({

0 commit comments

Comments
 (0)