fix: remove unnecessary URL allocation (#2554)

This commit is contained in:
Marvin Hagemeister
2024-06-27 12:34:56 +02:00
committed by GitHub
parent bfb5753ecb
commit 138d4c457c
4 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -111,6 +111,7 @@ export class FreshReqContext<State>
constructor(
req: Request,
url: URL,
info: Deno.ServeHandlerInfo | Deno.ServeUnixHandlerInfo,
params: Record<string, string>,
config: ResolvedFreshConfig,
@@ -118,7 +119,7 @@ export class FreshReqContext<State>
islandRegistry: ServerIslandRegistry,
buildCache: BuildCache,
) {
this.url = new URL(req.url);
this.url = url;
this.req = req;
this.info = info;
this.params = params;