clear-react-router 1.7.4 → 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.
package/README.md CHANGED
@@ -418,8 +418,6 @@ You can also invalidate any registered route by passing its pathname:
418
418
  const invalidate = useInvalidate();
419
419
 
420
420
  await invalidate('/posts');
421
- await invalidate('/posts/[id]');
422
- await invalidate('/posts/[id]/comment/[id]');
423
421
  ```
424
422
 
425
423
  The route does not need to be currently active. Its cache will be marked as stale, and the next time it is visited, `beforeLoad` and `loader` will run again.
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.4",
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": {