Skip to content

Commit

Permalink
Update docs/src/modules/utils/useRouterExtra.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Olivier Tassinari <[email protected]>
Signed-off-by: Siriwat K <[email protected]>
  • Loading branch information
siriwatknp and oliviertassinari authored Feb 13, 2023
1 parent 2227060 commit 573860a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/modules/utils/useRouterExtra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function useRouterExtra() {

const asPathWithoutLang = router.asPath.replace(/^\/+[a-zA-Z]{2}\//, '/');
let product = asPathWithoutLang.replace(/^\/+([^/]+)\/.*/, '$1');
if (asPathWithoutLang.startsWith('/x')) {
if (asPathWithoutLang.startsWith('/x/')) {
product = asPathWithoutLang.replace('/x/react-', '').replace(/\/.*/, '');
}
return {
Expand Down

0 comments on commit 573860a

Please sign in to comment.