File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
packages/runtime/src/templates/edge Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,16 @@ globalThis.NFRequestContextMap ||= new Map()
7
7
globalThis . __dirname = fromFileUrl ( new URL ( './' , import . meta. url ) ) . slice ( 0 , - 1 )
8
8
9
9
// Next.js uses this extension to the Headers API implemented by Cloudflare workerd
10
- if ( ! ( 'getAll' in Headers . prototype ) ) {
10
+ if ( ! ( 'getAll' in Headers . prototype ) ) {
11
11
Headers . prototype . getAll = function getAll ( name ) {
12
- name = name . toLowerCase ( ) ;
13
- if ( name !== " set-cookie" ) {
14
- throw new Error ( " Headers.getAll is only supported for Set-Cookie" ) ;
12
+ name = name . toLowerCase ( )
13
+ if ( name !== ' set-cookie' ) {
14
+ throw new Error ( ' Headers.getAll is only supported for Set-Cookie' )
15
15
}
16
- return [ ...this . entries ( ) ]
17
- . filter ( ( [ key ] ) => key === name )
18
- . map ( ( [ , value ] ) => value ) ;
19
- } ;
16
+ return [ ...this . entries ( ) ] . filter ( ( [ key ] ) => key === name ) . map ( ( [ , value ] ) => value )
17
+ }
20
18
}
21
19
22
-
23
20
// Check if a file exists, given a relative path
24
21
const exists = async ( relativePath ) => {
25
22
const path = fromFileUrl ( new URL ( relativePath , import . meta. url ) )
You can’t perform that action at this time.
0 commit comments