0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

refactor(console): update relative path checking logic

This commit is contained in:
Gao Sun 2023-09-04 12:55:32 +08:00
parent e599e3651c
commit e8c544afcb
No known key found for this signature in database
GPG key ID: 13EBE123E4773688

View file

@ -67,7 +67,7 @@ function useTenantPathname(): TenantPathname {
const match = useCallback(
(pathname: string, exact = false) => {
// Match relative pathnames directly
if (pathname.startsWith('.')) {
if (!pathname.startsWith('/')) {
return (
matchPath(joinPath(location.pathname, pathname, exact ? '' : '*'), location.pathname) !==
null