Skip to content

Commit

Permalink
Add a comment about the await
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanclark authored and github-actions committed Nov 6, 2024
1 parent bc29b21 commit 453579c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/packages/teleport/src/teleportContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ class TeleportContext implements types.Context {

if (user.acl.accessGraph.list) {
// If access graph is enabled, check what features are enabled and store them in local storage.
// We await this so it is done by the time the page renders, otherwise the local storage event
// wouldn't trigger a re-render and Policy could end up not being displayed until the navigation
// is re-rendered.
await userService
.fetchAccessGraphFeatures()
.then(features => {
Expand Down

0 comments on commit 453579c

Please sign in to comment.