Skip to content

ContextMenu.items throws exception if undefined #4547

Open
@Feuerwerk

Description

@Feuerwerk

Description

Class ItemsMixinClass (which is base class of ContextMenu) defines that the property items can be undefined but if you set the property to this value you get an exception ("...can't read properties from undefined...")

Expected outcome

No exception is thrown either by defining ItemsMixinClass.items of type ContextMenuItem[] only or by testing if items is undefined so no exception is thrown.

Minimal reproducible example

<vaadin-context-menu .items=${undefined}></vaadin-context-menu>

Steps to reproduce

Nothing to add

Environment

Vaadin version(s): Hilla 1.2.0
OS: macOS 12.5.1

Browsers

Issue is not browser related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions