Skip to content

TypeError: Cannot read properties of null (reading 'focus') in profile.js #232

@shsteimer

Description

@shsteimer

Error from Error Analyzer

View in Error Analyzer

Root Cause

ensureLogin() calls orgItem.querySelector('.button.login').focus() but a race condition between two getLoginInfo() calls (one in ensureLogin, one in updateProjects) can cause the login button to be rendered with class logout instead of login if the auth state changes in between. The querySelector returns null and .focus() throws.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions