diff --git a/src/utils/utils.ts b/src/utils/utils.ts index e0afc31e..1f43882c 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -35,8 +35,8 @@ export const getAuthorityFromRouter = ( pathname: string, ): T | undefined => { const authority = router.find( - ({ routes, path = '/' }) => - (path && pathRegexp(path).exec(pathname)) || + ({ routes, path = '/', target = '_self' }) => + (path && target !== '_blank' && pathRegexp(path).exec(pathname)) || (routes && getAuthorityFromRouter(routes, pathname)), ); if (authority) return authority;