File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed
Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ import { FLIGHT_HEADERS } from '../../client/components/app-router-headers'
99 */
1010export function stripFlightHeaders ( headers : IncomingHttpHeaders ) {
1111 for ( const header of FLIGHT_HEADERS ) {
12- delete headers [ header ]
12+ headers [ header ] = undefined
1313 }
1414}
Original file line number Diff line number Diff line change @@ -2018,7 +2018,7 @@ export default abstract class Server<
20182018 if ( ! addedNextUrlToVary ) {
20192019 // Remove `Next-URL` from the request headers we determined it wasn't necessary to include in the Vary header.
20202020 // This is to avoid any dependency on the `Next-URL` header being present when preparing the response.
2021- delete req . headers [ NEXT_URL ]
2021+ req . headers [ NEXT_URL ] = undefined
20222022 }
20232023 }
20242024
@@ -2579,7 +2579,7 @@ export default abstract class Server<
25792579 query [ NEXT_RSC_UNION_QUERY ]
25802580 )
25812581 }
2582- delete query [ NEXT_RSC_UNION_QUERY ]
2582+ query [ NEXT_RSC_UNION_QUERY ] = undefined
25832583
25842584 const options : MatchOptions = {
25852585 i18n : this . i18nProvider ?. fromRequest ( req , pathname ) ,
Original file line number Diff line number Diff line change @@ -1119,7 +1119,7 @@ export default class NextNodeServer extends BaseServer<
11191119 await this . render404 ( req , res , parsedUrl )
11201120 return true
11211121 }
1122- delete query [ NEXT_RSC_UNION_QUERY ]
1122+ query [ NEXT_RSC_UNION_QUERY ] = undefined
11231123
11241124 // If we handled the request, we can return early.
11251125 // For api routes edge runtime
Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ export function removeRequestMeta<K extends keyof RequestMeta>(
372372 key : K
373373) {
374374 const meta = getRequestMeta ( request )
375- delete meta [ key ]
375+ meta [ key ] = undefined as RequestMeta [ K ]
376376 return setRequestMeta ( request , meta )
377377}
378378
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ function filterInternalQuery(
3434) {
3535 // this is used to pass query information in rewrites
3636 // but should not be exposed in final query
37- delete query [ 'nextInternalLocale' ]
37+ query [ 'nextInternalLocale' ] = undefined
3838
3939 for ( const key in query ) {
4040 const isNextQueryPrefix =
@@ -49,7 +49,7 @@ function filterInternalQuery(
4949 isNextInterceptionMarkerPrefix ||
5050 paramKeys . includes ( key )
5151 ) {
52- delete query [ key ]
52+ query [ key ] = undefined
5353 }
5454 }
5555}
@@ -398,7 +398,7 @@ export function getServerUtils({
398398 ) {
399399 // this is used to pass query information in rewrites
400400 // but should not be exposed in final query
401- delete query [ 'nextInternalLocale' ]
401+ query [ 'nextInternalLocale' ] = undefined
402402
403403 for ( const [ key , value ] of Object . entries ( query ) ) {
404404 const normalizedKey = normalizeNextQueryParam ( key )
You can’t perform that action at this time.
0 commit comments