Skip to content

Potential Null Reference Error in App.js #460

@xingarr

Description

@xingarr

Regex match could return null if theme parameter doesn't match the pattern.

Location:
src/App.js, line 26
const theme = urlParams.get('theme') && urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0]

Impact: Could throw an error if match returns null and you try to access [0].

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