File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/adapter/service-worker Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,9 @@ describe('handle', () => {
96
96
const app = new Hono ( )
97
97
98
98
app . get ( '/' , ( c ) => {
99
- const fetchEvent = c . env as FetchEvent
100
99
return c . json ( {
101
- clientId : fetchEvent . clientId ,
100
+ // @ts -expect-error executionCtx is FetchEvent but not typed well
101
+ clientId : c . executionCtx . clientId ,
102
102
} )
103
103
} )
104
104
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ export const handle = (
24
24
return ( evt ) => {
25
25
evt . respondWith (
26
26
( async ( ) => {
27
- const res = await app . fetch ( evt . request , evt )
27
+ // @ts -expect-error Passing FetchEvent but app.fetch expects ExecutionContext
28
+ const res = await app . fetch ( evt . request , { } , evt )
28
29
if ( opts . fetch && res . status === 404 ) {
29
30
return await opts . fetch ( evt . request )
30
31
}
You can’t perform that action at this time.
0 commit comments