@esmx/router 3.0.0-rc.65 → 3.0.0-rc.69

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/router.mjs CHANGED
@@ -259,7 +259,7 @@ export class Router {
259
259
  });
260
260
  await router.replace(toInput);
261
261
  router.afterEach((to, from) => {
262
- if (layerOptions.shouldClose) {
262
+ if (layerOptions.shouldClose && to.type !== RouteType.pushWindow && to.type !== RouteType.replaceWindow && to.type !== RouteType.replace && to.type !== RouteType.restartApp) {
263
263
  const result = layerOptions.shouldClose(to, from, router);
264
264
  if (result === true) {
265
265
  router.destroy();
package/package.json CHANGED
@@ -39,7 +39,7 @@
39
39
  "unbuild": "3.6.0",
40
40
  "vitest": "3.2.4"
41
41
  },
42
- "version": "3.0.0-rc.65",
42
+ "version": "3.0.0-rc.69",
43
43
  "type": "module",
44
44
  "private": false,
45
45
  "exports": {
@@ -58,5 +58,5 @@
58
58
  "template",
59
59
  "public"
60
60
  ],
61
- "gitHead": "3061beefe4d43c54ce66b75c2d95f193601d1289"
61
+ "gitHead": "340151dd2777a5d7a10cd08e10783fdc24fb7eb5"
62
62
  }
package/src/router.ts CHANGED
@@ -292,7 +292,13 @@ export class Router {
292
292
  await router.replace(toInput);
293
293
 
294
294
  router.afterEach((to, from) => {
295
- if (layerOptions.shouldClose) {
295
+ if (
296
+ layerOptions.shouldClose &&
297
+ to.type !== RouteType.pushWindow &&
298
+ to.type !== RouteType.replaceWindow &&
299
+ to.type !== RouteType.replace &&
300
+ to.type !== RouteType.restartApp
301
+ ) {
296
302
  const result = layerOptions.shouldClose(to, from, router);
297
303
  if (result === true) {
298
304
  router.destroy();