@jsenv/navi 0.15.8 → 0.15.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17324,12 +17324,19 @@ const RouteLink = ({
17324
17324
  }
17325
17325
  const routeStatus = useRouteStatus(route);
17326
17326
  const url = route.buildUrl(routeParams);
17327
- const paramsAreMatching = route.matchesParams(routeParams);
17327
+ let isCurrent;
17328
+ if (routeStatus.exactMatching) {
17329
+ isCurrent = true;
17330
+ } else if (routeStatus.matching) {
17331
+ isCurrent = routeParams ? route.matchesParams(routeParams) : false;
17332
+ } else {
17333
+ isCurrent = false;
17334
+ }
17328
17335
  return jsx(Link, {
17329
17336
  ...rest,
17330
17337
  href: url,
17331
17338
  pseudoState: {
17332
- ":-navi-href-current": paramsAreMatching ? routeStatus.matching : routeStatus.exactMatching
17339
+ ":-navi-href-current": isCurrent
17333
17340
  },
17334
17341
  children: children || route.buildRelativeUrl(routeParams)
17335
17342
  });