@absolutejs/absolute 0.19.0-beta.1094 → 0.19.0-beta.1095

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
@@ -24413,6 +24413,20 @@ export const setupApp = async (app, ctx) => {
24413
24413
  if (__absoluteUserSetupApp__) {
24414
24414
  await __absoluteUserSetupApp__(app, { ...ctx, router });
24415
24415
  }
24416
+ const currentRouteMatched = router.currentRoute.value.matched.length > 0;
24417
+ if (!currentRouteMatched) {
24418
+ if (ctx.isServer) {
24419
+ ctx.setNotFound();
24420
+ } else {
24421
+ window.location.assign(ctx.url);
24422
+ }
24423
+ return;
24424
+ }
24425
+ if (!ctx.isServer) {
24426
+ router.afterEach((to) => {
24427
+ if (to.matched.length === 0) window.location.assign(to.fullPath);
24428
+ });
24429
+ }
24416
24430
  };
24417
24431
  `;
24418
24432
  return sourceContent.replace(SCRIPT_REGEX, `${openTag}${rewrittenScript}${autoWrapper}${closeTag}`);
@@ -24836,6 +24850,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
24836
24850
  " await setupAppHook(app, {",
24837
24851
  " isServer: false,",
24838
24852
  " router: null,",
24853
+ " setNotFound: () => {},",
24839
24854
  " setRedirect: () => {},",
24840
24855
  " url: clientUrl",
24841
24856
  " });",
@@ -47761,5 +47776,5 @@ export {
47761
47776
  ANGULAR_INIT_TIMEOUT_MS
47762
47777
  };
47763
47778
 
47764
- //# debugId=1579DC7EEE9BCDA264756E2164756E21
47779
+ //# debugId=1D2543DFA3A7B3D964756E2164756E21
47765
47780
  //# sourceMappingURL=index.js.map