Skip to content

Bug - LoginPage - Brand is always created even if optional attributes empty #11984

@rebeccaalpert

Description

@rebeccaalpert

Describe the problem
brandImgSrc and brandImgAlt are marked as optional LoginPage props, but the Brand component gets created anyway: https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/components/LoginPage/LoginPage.tsx#L68

Brent Dunn reported on PatternFly Slack that "An empty string ("") was passed to the src attribute" was being logged when these are omitted: https://codesandbox.io/p/devbox/dreamy-fog-qrqy95

How do you reproduce the problem?
https://codesandbox.io/p/devbox/dreamy-fog-qrqy95

Expected behavior
Optional props should optionally render component.

Is this issue blocking you?
Not urgent

What is your product and what release date are you targeting?
Not urgent

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions