mirror of
https://github.com/logto-io/logto.git
synced 2025-01-13 21:30:30 -05:00
refactor(console): update relative path checking logic
This commit is contained in:
parent
e599e3651c
commit
e8c544afcb
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ function useTenantPathname(): TenantPathname {
|
||||||
const match = useCallback(
|
const match = useCallback(
|
||||||
(pathname: string, exact = false) => {
|
(pathname: string, exact = false) => {
|
||||||
// Match relative pathnames directly
|
// Match relative pathnames directly
|
||||||
if (pathname.startsWith('.')) {
|
if (!pathname.startsWith('/')) {
|
||||||
return (
|
return (
|
||||||
matchPath(joinPath(location.pathname, pathname, exact ? '' : '*'), location.pathname) !==
|
matchPath(joinPath(location.pathname, pathname, exact ? '' : '*'), location.pathname) !==
|
||||||
null
|
null
|
||||||
|
|
Loading…
Add table
Reference in a new issue