summaryrefslogtreecommitdiff
path: root/packages/frontend/src/nirax.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/nirax.ts')
-rw-r--r--packages/frontend/src/nirax.ts20
1 files changed, 12 insertions, 8 deletions
diff --git a/packages/frontend/src/nirax.ts b/packages/frontend/src/nirax.ts
index 616fb104e6..6a8ea09ed6 100644
--- a/packages/frontend/src/nirax.ts
+++ b/packages/frontend/src/nirax.ts
@@ -373,7 +373,7 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
this.currentRoute.value = res.route;
this.currentKey = res.route.globalCacheKey ?? key ?? path;
- if (emitChange) {
+ if (emitChange && res.route.path !== '/:(*)') {
this.emit('change', {
beforePath,
path,
@@ -408,13 +408,17 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
if (cancel) return;
}
const res = this.navigate(path, null);
- this.emit('push', {
- beforePath,
- path: res._parsedRoute.fullPath,
- route: res.route,
- props: res.props,
- key: this.currentKey,
- });
+ if (res.route.path === '/:(*)') {
+ location.href = path;
+ } else {
+ this.emit('push', {
+ beforePath,
+ path: res._parsedRoute.fullPath,
+ route: res.route,
+ props: res.props,
+ key: this.currentKey,
+ });
+ }
}
public replace(path: string, key?: string | null) {