Pull request #184: fix navigation on refresh
Merge in RED/ui from RED-1478 to master * commit 'd4b4f21cf1d97b510adbcba346ceb7986e3da944': fix navigation on refresh
This commit is contained in:
commit
949f086975
@ -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