clear-react-router 1.0.15 → 1.0.16

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 +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -243,11 +243,12 @@ var l = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
243
243
  }), d = s(""), f = T(r(async (r) => {
244
244
  try {
245
245
  let a = t.find((e) => w(e, r.pathname));
246
- 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);
246
+ console.log("before beforeLoad execution", a), a?.beforeLoad && await a?.beforeLoad(n), console.log("after beforeLoad execution", a), 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);
247
247
  } catch (t) {
248
+ console.log("redirect caught", t);
248
249
  let n = t;
249
250
  if (!E(n)) return n;
250
- history.replaceState(null, "", n.url), e({
251
+ console.log("redirect after type guard"), history.replaceState(null, "", n.url), e({
251
252
  pathname: n.url,
252
253
  search: n.search
253
254
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clear-react-router",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "A lightweight, type-safe routing library for React applications",
5
5
  "author": "Andrew Bubnov",
6
6
  "main": "./dist/index.js",