x-essential-lib 0.10.30 → 0.10.31

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 +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -606,9 +606,9 @@ function isHasAccessToken() {
606
606
  async function onBeforeEach(to, from, lastAppPath) {
607
607
  const hasAccessToken = isHasAccessToken();
608
608
  const toRouteMeta = matchRouteMeta(to.path);
609
- if (!toRouteMeta) return;
609
+ if (!toRouteMeta) return { path: `/main` };
610
610
  if (toRouteMeta.requireAuth && !hasAccessToken) return { path: `/passport/login` };
611
- if (hasAccessToken && to.path.startsWith("/passport/")) return { path: `/main/${Date.now()}` };
611
+ if (hasAccessToken && to.path.startsWith("/passport/")) return { path: `/main` };
612
612
  onBeforeChange(to.path, from.path, lastAppPath);
613
613
  }
614
614
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
- "version": "0.10.30",
3
+ "version": "0.10.31",
4
4
  "files": [
5
5
  "dist"
6
6
  ],