Skip to content

RangeError: Invalid array length in MenuItemNestedText when opening payment account selector #1143

Description

@ashlynnsholbert-dev

The MenuItemNestedText component's item renderer passes e.accountLevel (camelCase), but the accounts API returns account_level (snake_case). The data mapping layer doesn't convert this field, so accountLevel is undefined. The function P then computes Array(undefined - 1) which is Array(NaN), throwing a RangeError. This affects the payment account selector on the New Expense form — the dropdown renders empty and crashes. Reproducible on a fresh install using bigcapitalhq/webapp:latest (built 2026-06-20).

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