baaz-custom-components 3.2.10 → 3.2.11
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.
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -738,12 +738,13 @@ function buildFullHref(base, child) {
|
|
|
738
738
|
return new URL(child, base).toString();
|
|
739
739
|
}
|
|
740
740
|
function isRouteActive(fullHref, currentPathname) {
|
|
741
|
-
const
|
|
741
|
+
const hrefPathRaw = extractPathname(fullHref);
|
|
742
742
|
const hrefOrigin = extractOrigin(fullHref);
|
|
743
743
|
const currentOrigin = getCurrentOrigin();
|
|
744
744
|
if (hrefOrigin && currentOrigin && hrefOrigin !== currentOrigin) {
|
|
745
745
|
return false;
|
|
746
746
|
}
|
|
747
|
+
const hrefPath = hrefPathRaw.endsWith("/-") ? hrefPathRaw.slice(0, -2) : hrefPathRaw;
|
|
747
748
|
return currentPathname === hrefPath || currentPathname.startsWith(hrefPath + "/");
|
|
748
749
|
}
|
|
749
750
|
function treeContainsPath({
|
package/dist/index.mjs
CHANGED
|
@@ -704,12 +704,13 @@ function buildFullHref(base, child) {
|
|
|
704
704
|
return new URL(child, base).toString();
|
|
705
705
|
}
|
|
706
706
|
function isRouteActive(fullHref, currentPathname) {
|
|
707
|
-
const
|
|
707
|
+
const hrefPathRaw = extractPathname(fullHref);
|
|
708
708
|
const hrefOrigin = extractOrigin(fullHref);
|
|
709
709
|
const currentOrigin = getCurrentOrigin();
|
|
710
710
|
if (hrefOrigin && currentOrigin && hrefOrigin !== currentOrigin) {
|
|
711
711
|
return false;
|
|
712
712
|
}
|
|
713
|
+
const hrefPath = hrefPathRaw.endsWith("/-") ? hrefPathRaw.slice(0, -2) : hrefPathRaw;
|
|
713
714
|
return currentPathname === hrefPath || currentPathname.startsWith(hrefPath + "/");
|
|
714
715
|
}
|
|
715
716
|
function treeContainsPath({
|