Skip to content

Commit 64bedb5

Browse files
fix: #2081 resolve URL with locale prefix in getWordPressProps
1 parent 9fa95cf commit 64bedb5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/faustwp-core/src/getWordPressProps.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ export async function getWordPressProps(
107107
ctx.res.setHeader('x-using', 'faust');
108108
}
109109

110+
if (ctx.locale !== ctx.defaultLocale && resolvedUrl !== '/') {
111+
resolvedUrl = `/${ctx.locale}${resolvedUrl}`;
112+
}
113+
110114
resolvedUrl = hooks.applyFilters('resolvedUrl', resolvedUrl, {
111115
nextContext: ctx,
112116
}) as string | null;

0 commit comments

Comments
 (0)