Skip to content

Conversation

@KycKyc
Copy link

@KycKyc KycKyc commented Mar 25, 2021

If project have to use subdirectories (lang prefixes), like:
example.com/user - for English
example.com/de/user - for German
example.com/ko/user - for Korean

We will face some problems:
if /user node is children of / node as well as children of /ko node.
When code will try to find a match for /user by going through / node, it will slice / from /user segment, so at the next iteration code will try to find a match for user instead of /user, thus will return null as result.

So my proposal is to change literally one line of code, this shouldn't break anything, if i understand everything right.

E.g. when `/user` node is children of `/` node as well as children of `/ko` node.
Where:
`/`   - for English lang node
`/ko` - for Korean lang node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant