You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v5.1.1
Node v22.12.0
System Linux (x64)
Package Manager npm
Output static
Adapter @astrojs/node
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No
Describe the Bug
I'm setting up two locales for my project. When I visit the /en path, getLocaleByPath throws an error, even though it's guarded inside pathHasLocale.
I want to use the result locale to determine the page direction in my HTML based on the locale I get as I don't know the path the user is currently browsing beforehand.
pathHasLocale returns true on the same path that getLocaleByPath fails at.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No
Describe the Bug
I'm setting up two locales for my project. When I visit the
/en
path,getLocaleByPath
throws an error, even though it's guarded insidepathHasLocale
.I want to use the result locale to determine the page direction in my HTML based on the locale I get as I don't know the path the user is currently browsing beforehand.
pathHasLocale
returns true on the same path thatgetLocaleByPath
fails at.What's the expected result?
getLocaleByPath
should returnen
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-ttp7ddbz?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: