fix navigation on refresh
This commit is contained in:
parent
65352263dd
commit
d4b4f21cf1
@ -72,7 +72,7 @@ export class AppStateService {
|
||||
this._router.events.subscribe((event: Event) => {
|
||||
if (AppStateService._isFileOverviewRoute(event)) {
|
||||
const url = (event as ResolveStart).url.replace('/main/projects/', '');
|
||||
const [projectId, , fileId] = url.split('/');
|
||||
const [projectId, , fileId] = url.split(/[/?]/);
|
||||
this.activateFile(projectId, fileId);
|
||||
}
|
||||
if (AppStateService._isProjectOverviewRoute(event)) {
|
||||
|
||||
@ -49,7 +49,7 @@ export class CustomRouteReuseStrategy implements RouteReuseStrategy {
|
||||
}
|
||||
|
||||
shouldReuseRoute(future: ActivatedRouteSnapshot, current: ActivatedRouteSnapshot): boolean {
|
||||
return this._getKey(future) === this._getKey(current);
|
||||
return future.routeConfig === current.routeConfig || this._getKey(future) === this._getKey(current);
|
||||
}
|
||||
|
||||
private _getKey(route: ActivatedRouteSnapshot): string {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user