forked from mirror/misskey
fix(frontend): router遷移時にmatchAllに入った場合一度location.href
を経由するように (#13509)
* fix(frontend): router遷移時にmatchAllに入った場合一度`location.href`を経由するように * Update Changelog * Update CHANGELOG.md * remove unnecessary args
This commit is contained in:
parent
83a5bc0ecd
commit
45672a70f9
@ -4,7 +4,7 @@
|
|||||||
-
|
-
|
||||||
|
|
||||||
### Client
|
### Client
|
||||||
-
|
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
-
|
-
|
||||||
|
@ -373,7 +373,7 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
|
|||||||
this.currentRoute.value = res.route;
|
this.currentRoute.value = res.route;
|
||||||
this.currentKey = res.route.globalCacheKey ?? key ?? path;
|
this.currentKey = res.route.globalCacheKey ?? key ?? path;
|
||||||
|
|
||||||
if (emitChange) {
|
if (emitChange && res.route.path !== '/:(*)') {
|
||||||
this.emit('change', {
|
this.emit('change', {
|
||||||
beforePath,
|
beforePath,
|
||||||
path,
|
path,
|
||||||
@ -408,6 +408,9 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
|
|||||||
if (cancel) return;
|
if (cancel) return;
|
||||||
}
|
}
|
||||||
const res = this.navigate(path, null);
|
const res = this.navigate(path, null);
|
||||||
|
if (res.route.path === '/:(*)') {
|
||||||
|
location.href = path;
|
||||||
|
} else {
|
||||||
this.emit('push', {
|
this.emit('push', {
|
||||||
beforePath,
|
beforePath,
|
||||||
path: res._parsedRoute.fullPath,
|
path: res._parsedRoute.fullPath,
|
||||||
@ -416,6 +419,7 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
|
|||||||
key: this.currentKey,
|
key: this.currentKey,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public replace(path: string, key?: string | null) {
|
public replace(path: string, key?: string | null) {
|
||||||
const res = this.navigate(path, key);
|
const res = this.navigate(path, key);
|
||||||
|
@ -48,6 +48,9 @@ const devConfig = {
|
|||||||
},
|
},
|
||||||
'/url': httpUrl,
|
'/url': httpUrl,
|
||||||
'/proxy': httpUrl,
|
'/proxy': httpUrl,
|
||||||
|
'/_info_card_': httpUrl,
|
||||||
|
'/bios': httpUrl,
|
||||||
|
'/cli': httpUrl,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
|
Loading…
Reference in New Issue
Block a user