fix dev mode issue where retrieving the login options fails

This commit is contained in:
Art Lowel
2023-09-26 14:44:13 +02:00
parent 8fbe8c16dc
commit 32fc28ec54
2 changed files with 14 additions and 6 deletions

View File

@@ -53,8 +53,10 @@ 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
this.rootDataService.invalidateRootCache();
// 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);
this.router.events.pipe(
filter(event => event instanceof NavigationStart),