Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid getting permissions twice when signed out. #3751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jrobbins
Copy link
Collaborator

When looking into chromestatus performance I noticed that the permissions API call was being done twice on some page loads. It was only happening for signed-out users. I think the cause was just the way that these comparisons are done. This fix should make the site a bit faster for signed-out users, and also eliminate a potential distraction as I continue to work on performance for signed-in users.


// user is passed in from chromedash-app, but the user is not logged in
if (!this.user) {
if (this.user === null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really mean "=== null". Where could the null value be coming from? Maybe add a comment about that.

@jrobbins
Copy link
Collaborator Author

The playwright timeouts were due to this change.
Figuring out how to do this right is going to be more complex that I thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants