ensure HALEndpointService doesn't use stale requests

(cherry picked from commit 38752d9d71)
This commit is contained in:
Art Lowel
2023-11-29 14:25:36 +01:00
committed by github-actions[bot]
parent 92a10ce9de
commit bd6c99da2e
3 changed files with 16 additions and 12 deletions

View File

@@ -53,10 +53,8 @@ export class ServerCheckGuard implements CanActivateChild {
*/
listenForRouteChanges(): void {
// we'll always be too late for the first NavigationStart event with the router subscribe below,
// so this statement is for the very first route operation. A `find` without using the cache,
// rather than an invalidateRootCache, because invalidating as the app is bootstrapping can
// break other features
this.rootDataService.findRoot(false);
// so this statement is for the very first route operation.
this.rootDataService.invalidateRootCache();
this.router.events.pipe(
filter(event => event instanceof NavigationStart),