clear-react-router 1.7.5 → 1.7.6

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -206,7 +206,7 @@ var comparePaths = (el, pathname) => {
206
206
  const splitElementPath = el.path.split("/").filter(Boolean);
207
207
  const paramsLength = el.params ? Object.keys(el.params).length : 0;
208
208
  const splitPathname = pathname.split("/").filter(Boolean);
209
- return splitElementPath.every((item, index) => item === splitPathname[index + (index ? 1 : 0)]) && splitPathname.length === splitElementPath.length + paramsLength;
209
+ return splitElementPath.every((item, index) => item === splitPathname[2 * index]) && splitPathname.length === splitElementPath.length + paramsLength;
210
210
  };
211
211
  //#endregion
212
212
  //#region utils/getContext.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clear-react-router",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "description": "A lightweight, type-safe routing library for React applications",
5
5
  "author": "Andrew Bubnov",
6
6
  "scripts": {