Skip to content

Commit 77d47d9

Browse files
authored
Merge pull request #18800 from ethereum/recovery/fix/slug-catchall-setrequestlocale-order
[recovery] fix: setRequestLocale ordering in [...slug] generateMetadata (static→dynamic error)
2 parents eca3652 + dc9c0cd commit 77d47d9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/[locale]/[...slug]/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ export async function generateMetadata(props: {
154154
const params = await props.params
155155
const { locale, slug } = params
156156

157+
// Set locale before next-intl APIs so on-demand renders stay static
158+
setRequestLocale(locale)
159+
157160
try {
158161
return await getMdMetadata({
159162
locale,

0 commit comments

Comments
 (0)