@@ -518,7 +518,6 @@ async function generateDynamicRSCPayload(
518
518
/>
519
519
{ /* Adding requestId as react key to make metadata remount for each render */ }
520
520
< ViewportTree key = { getFlightViewportKey ( requestId ) } />
521
- { /* Not add requestId as react key to ensure segment prefetch could result consistently if nothing changed */ }
522
521
< MetadataTree key = { getFlightMetadataKey ( requestId ) } />
523
522
</ React . Fragment >
524
523
) ,
@@ -857,8 +856,7 @@ async function getRSCPayload(
857
856
statusCode = { ctx . res . statusCode }
858
857
isPossibleServerAction = { ctx . isPossibleServerAction }
859
858
/>
860
- < ViewportTree key = { getFlightViewportKey ( ctx . requestId ) } />
861
- { /* Not add requestId as react key to ensure segment prefetch could result consistently if nothing changed */ }
859
+ < ViewportTree />
862
860
< MetadataTree />
863
861
</ React . Fragment >
864
862
)
@@ -926,7 +924,6 @@ async function getErrorRSCPayload(
926
924
ViewportBoundary,
927
925
} ,
928
926
url,
929
- requestId,
930
927
workStore,
931
928
} = ctx
932
929
@@ -945,22 +942,18 @@ async function getErrorRSCPayload(
945
942
serveStreamingMetadata : serveStreamingMetadata ,
946
943
} )
947
944
948
- // {/* Adding requestId as react key to make metadata remount for each render */}
949
- const metadata = < MetadataTree key = { getFlightMetadataKey ( requestId ) } />
950
-
951
945
const initialHead = (
952
946
< React . Fragment key = { flightDataPathHeadKey } >
953
947
< NonIndex
954
948
pagePath = { ctx . pagePath }
955
949
statusCode = { ctx . res . statusCode }
956
950
isPossibleServerAction = { ctx . isPossibleServerAction }
957
951
/>
958
- { /* Adding requestId as react key to make metadata remount for each render */ }
959
- < ViewportTree key = { getFlightViewportKey ( requestId ) } />
952
+ < ViewportTree />
960
953
{ process . env . NODE_ENV === 'development' && (
961
954
< meta name = "next-error" content = "not-found" />
962
955
) }
963
- { metadata }
956
+ < MetadataTree />
964
957
</ React . Fragment >
965
958
)
966
959
@@ -980,7 +973,9 @@ async function getErrorRSCPayload(
980
973
const seedData : CacheNodeSeedData = [
981
974
initialTree [ 0 ] ,
982
975
< html id = "__next_error__" >
983
- < head > { metadata } </ head >
976
+ < head >
977
+ < MetadataTree />
978
+ </ head >
984
979
< body >
985
980
{ process . env . NODE_ENV !== 'production' && err ? (
986
981
< template
0 commit comments