Skip to content

Commit 237a785

Browse files
committed
[core] allow promised BareFetchResponse in ScramjetRequestEvent
1 parent 3f54c3f commit 237a785

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/worker/fetch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export async function handleFetch(
254254
this.dispatchEvent(ev);
255255

256256
const response: BareResponseFetch =
257-
ev.response ||
257+
(await ev.response) ||
258258
(await this.client.fetch(ev.url, {
259259
method: ev.method,
260260
body: ev.body,
@@ -558,5 +558,5 @@ export class ScramjetRequestEvent extends Event {
558558
) {
559559
super("request");
560560
}
561-
public response?: BareResponseFetch;
561+
public response?: BareResponseFetch | Promise<BareResponseFetch>;
562562
}

0 commit comments

Comments
 (0)