@jsenv/navi 0.16.4 → 0.16.5
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/jsenv_navi.js +8 -2
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -8482,9 +8482,15 @@ const isParentRoute = (parentPattern, childPattern) => {
|
|
|
8482
8482
|
const parentPath = normalizePath(parentPattern);
|
|
8483
8483
|
const childPath = normalizePath(childPattern);
|
|
8484
8484
|
|
|
8485
|
-
//
|
|
8485
|
+
// Special case: root route "/" should never clear signals from other routes
|
|
8486
|
+
// The root route is conceptually different from all other app sections
|
|
8487
|
+
if (parentPath === "/") {
|
|
8488
|
+
return false;
|
|
8489
|
+
}
|
|
8490
|
+
|
|
8491
|
+
// Parent route is a parent if child path starts with parent path + "/"
|
|
8486
8492
|
// and child has additional segments
|
|
8487
|
-
return childPath.startsWith(parentPath) && childPath !== parentPath;
|
|
8493
|
+
return childPath.startsWith(`${parentPath}/`) && childPath !== parentPath;
|
|
8488
8494
|
};
|
|
8489
8495
|
|
|
8490
8496
|
// Controls what happens to actions when their route stops matching:
|