Remove auth-pre-fetch from the critical path.
Google-Bug-Id: b/296170053
Release-Notes: skip
Change-Id: I465f5be00667669259d7755655997102f2194956
diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router.ts b/polygerrit-ui/app/elements/core/gr-router/gr-router.ts
index 864f559..bb67a40 100644
--- a/polygerrit-ui/app/elements/core/gr-router/gr-router.ts
+++ b/polygerrit-ui/app/elements/core/gr-router/gr-router.ts
@@ -102,6 +102,7 @@
import {
InteractivePromise,
interactivePromise,
+ noAwait,
timeoutPromise,
} from '../../../utils/async-util';
@@ -506,9 +507,8 @@
/** gr-page middleware that warms the REST API's logged-in cache line. */
private loadUserMiddleware(_: PageContext, next: PageNextCallback) {
- this.restApiService.getLoggedIn().then(() => {
- next();
- });
+ noAwait(this.restApiService.getLoggedIn());
+ next();
}
/**