Skip to content

Bug: display_appropriate_suits_list crashes on empty suits list #2841

Description

@immortal71

Summary

display_appropriate_suits_list/2 crashes when suits is empty.

Location

copi.owasp.org/lib/copi_web/live/game_live/game_form_helpers.ex

Repro

Call display_appropriate_suits_list(webapp, []).

Actual

hd(suits) raises on empty list and crashes the LiveView process.

Expected

Handle empty list safely and return generated suits for the selected edition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions