File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/open-next/src/overrides/wrappers Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ const handler: WrapperHandler<
4141 // Retrieve geo information from the cloudflare request
4242 // See https://developers.cloudflare.com/workers/runtime-apis/request
4343 // Note: This code could be moved to a cloudflare specific converter when one is created.
44- const cfProperties = ( request as any ) . cf as Record < string , string | null > ;
44+ const cfProperties = ( request as any ) . cf as
45+ | Record < string , string | null >
46+ | undefined ;
4547 for ( const [ propName , headerName ] of Object . entries (
4648 cfPropNameToHeaderName ,
4749 ) ) {
48- const propValue = cfProperties [ propName ] ;
49- if ( propValue !== null ) {
50+ const propValue = cfProperties ?. [ propName ] ;
51+ if ( propValue != null ) {
5052 internalEvent . headers [ headerName ] = propValue ;
5153 }
5254 }
You can’t perform that action at this time.
0 commit comments