clear-react-router 1.0.10 → 1.0.13

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 CHANGED
@@ -250,9 +250,9 @@ var l = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
250
250
  }), d = s(""), f = v(r(async (r) => {
251
251
  try {
252
252
  let a = t.find((e) => T(e, r.pathname));
253
- a?.beforeLoad && await a?.beforeLoad(n), e(r), r.pathname !== window.location.pathname && (history.pushState(null, "", r.pathname), d.current = r.pathname), await i(a), a?.afterLoad && await a?.afterLoad(n);
253
+ console.log("before beforeLoad execution", a, n), a?.beforeLoad && await a?.beforeLoad(n), console.log("after beforeLoad execution", a, n), e(r), console.log(r.pathname !== window.location.pathname), r.pathname !== window.location.pathname && (history.pushState(null, "", r.pathname), d.current = r.pathname), await i(a), a?.afterLoad && await a?.afterLoad(n);
254
254
  } catch (t) {
255
- if (!(t instanceof E)) return t;
255
+ if (console.log("redirect", t), !(t instanceof E)) return t;
256
256
  history.replaceState(null, "", `${t.url}${t.search || ""}`), e({
257
257
  pathname: t.url,
258
258
  search: t.search
@@ -1,4 +1,4 @@
1
- export declare class Redirect {
1
+ export declare class RedirectInstance {
2
2
  url: string;
3
3
  search?: string;
4
4
  cause: 'redirect';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clear-react-router",
3
- "version": "1.0.10",
3
+ "version": "1.0.13",
4
4
  "description": "A lightweight, type-safe routing library for React applications",
5
5
  "author": "Andrew Bubnov",
6
6
  "main": "./dist/index.js",